Rendera XPS till PPS inom C++-applikationer

Konvertera XPS till PPS i dina C++-applikationer utan att använda Microsoft® PowerPoint

 

Är du en C++-utvecklare som vill lägga till för att integrera XPS till PPS-konverteringsfunktionen i dina C++-applikationer? Du kan göra det i två enkla steg. Du kan exportera XPS till PPTX genom att använda Aspose.PDF for C++ . För det andra, genom att använda Aspose.Slides for C++ , kan du konvertera PPTX till PPS. Båda API:erna kommer under paketet Aspose.Total for C++ .

C++ API för att exportera XPS till PPS

  1. Öppna XPS-filen med klassreferens Document
  2. Konvertera XPS till PPTX genom att använda metodfunktionen Save
  3. Ladda PPTX-dokument genom att använda klassreferensen Presentation
  4. Spara dokumentet i PPS-format med hjälp av medlemsfunktionen Save och ställ in “Pps” som SaveFormat

Konverteringskrav

Installera från kommandoraden som nuget install Aspose.Total.Cpp eller via Package Manager Console of Visual Studio med Install-Package Aspose.Total.Cpp.

Alternativt kan du hämta offline MSI-installationsprogrammet eller DLL-filer i en ZIP-fil från downloads .

// load XPS file with an instance of Document class
auto doc = MakeObject<Document>(u"template.xps");
// save XPS as PPTX format 
doc->Save(u"PptxOutput.pptx", SaveFormat::Pptx);
// instantiate a Presentation object that represents a PPTX file
SharedPtr<Presentation> prs = MakeObject<Presentation>(u"PptxOutput.pptx");
// save the presentation as Pps format
prs->Save(u"output.pps", Aspose::Slides::Export::SaveFormat::Pps);  

Ändra lösenord för XPS-dokument via C++

I processen att rendera XPS till PPS kan du öppna en lösenordsskyddad XPS och även ändra dess lösenord. För att ändra lösenordet för en XPS-fil måste du känna till ägarlösenordet för det dokumentet. Du kan ladda lösenordsskyddade PDF-dokument med Aspose.PDF for C++ genom att ange dess ägarlösenord och använda ChangePasswords-metoden för att ändra lösenordet.

// load an existing XPS Document
auto doc = MakeObject<Document>(L"input.xps", L"owner");
// change password of XPS Document
doc->ChangePasswords(L"owner", L"newuser", L"newuser");
// save the document
doc->Save(L"output.Doc");

Lägg till bilder från webben i PPS-fil via C++

Efter att ha konverterat XPS till PPS kan du också lägga till bilder från webben till ditt utdatadokument. Aspose.Slides for C++ stöder operationer med bilder i dessa populära format: JPEG, PNG, BMP, GIF och andra. Du kan lägga till en eller flera bilder på din dator på en bild i en presentation. Den här exempelkoden i C++ visar hur du lägger till en bild i en PPS-fil

// instantiate a Presentation object that represents a PPS file
auto pres = System::MakeObject<Presentation>("output.pps");
// get slide
auto slide = pres->get_Slides()->idx_get(0);
// initialize Web Client    
auto webClient = System::MakeObject<WebClient>();
// get image data
auto imageData = webClient->DownloadData(System::MakeObject<Uri>(u"[REPLACE WITH URL]"));
// add image
auto image = pres->get_Images()->AddImage(imageData);
// add picture frame
slide->get_Shapes()->AddPictureFrame(ShapeType::Rectangle, 10.0f, 10.0f, 100.0f, 100.0f, image);
// save updated file
pres->Save(u"updated.pps", SaveFormat::Pps);

Utforska XPS konverteringsalternativ med C++

Konvertera XPSs till DOCM (Microsoft Word 2007 Marco File)
Konvertera XPSs till DOT (Microsoft Word Template Files)
Konvertera XPSs till DOTM (Microsoft Word 2007+ Template File)
Konvertera XPSs till DOTX (Microsoft Word Template File)
Konvertera XPSs till FLATOPC (Microsoft Word 2003 WordprocessingML)
Konvertera XPSs till GIF (Graphical Interchange Format)
Konvertera XPSs till MHTML (Web Page Archive Format)
Konvertera XPSs till ODT (OpenDocument Text File Format)
Konvertera XPSs till OTT (OpenDocument Standard Format)
Konvertera XPSs till PCL (Printer Command Language Document)
Konvertera XPSs till PS (PostScript File)
Konvertera XPSs till RTF (Rich Text Format)
Konvertera XPSs till WORDML (Microsoft Word 2003 WordprocessingML)
Konvertera XPSs till CSV (Comma Seperated Values)
Konvertera XPSs till DIF (Data Interchange Format)
Konvertera XPSs till CSV (Comma Seperated Values)
Konvertera XPSs till FODS (OpenDocument Flat XML Spreadsheet)
Konvertera XPSs till MD (Markdown Language)
Konvertera XPSs till ODP (OpenDocument Presentation Format)
Konvertera XPSs till ODS (OpenDocument Spreadsheet)
Konvertera XPSs till OTP (OpenDocument Standard Format)
Konvertera XPSs till POT (Microsoft PowerPoint Template Files)
Konvertera XPSs till POTM (Microsoft PowerPoint Template File)
Konvertera XPSs till POTX (Microsoft PowerPoint Template Presentation)
Konvertera XPSs till PPSM (Macro-enabled Slide Show)
Konvertera XPSs till PPSX (PowerPoint Slide Show)
Konvertera XPSs till PPT (Microsoft PowerPoint 97-2003)
Konvertera XPSs till PPTM (Macro-enabled Presentation File)
Konvertera XPSs till SWF (Shockwave Flash Movie)
Konvertera XPSs till SXC (StarOffice Calc Spreadsheet)
Konvertera XPSs till TSV (Tab Seperated Values)
Konvertera XPSs till TXT (Text Document)
Konvertera XPSs till XLAM (Excel Macro-Enabled Add-In)
Konvertera XPSs till XLSB (Excel Binary Workbook)
Konvertera XPSs till XLSM (Macro-enabled Spreadsheet)
Konvertera XPSs till XLT (Excel 97 - 2003 Template)