Rendera PDF till ODP inom C++-applikationer

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

 

Är du en C++-utvecklare som vill lägga till för att integrera PDF till ODP-konverteringsfunktionen i dina C++-applikationer? Du kan göra det i två enkla steg. Du kan exportera PDF 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 ODP. Båda API:erna kommer under paketet Aspose.Total for C++ .

C++ API för att exportera PDF till ODP

  1. Öppna PDF-filen med klassreferens Document
  2. Konvertera PDF till PPTX genom att använda metodfunktionen Save
  3. Ladda PPTX-dokument genom att använda klassreferensen Presentation
  4. Spara dokumentet i ODP-format med hjälp av medlemsfunktionen Save och ställ in “Odp” 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 PDF file with an instance of Document class
auto doc = MakeObject<Document>(u"template.pdf");
// save PDF 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 Odp format
prs->Save(u"output.odp", Aspose::Slides::Export::SaveFormat::Odp);  

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

I processen att rendera PDF till ODP kan du öppna en lösenordsskyddad PDF och även ändra dess lösenord. För att ändra lösenordet för en PDF-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 PDF Document
auto doc = MakeObject<Document>(L"input.pdf", L"owner");
// change password of PDF 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 ODP-fil via C++

Efter att ha konverterat PDF till ODP 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 ODP-fil

// instantiate a Presentation object that represents a ODP file
auto pres = System::MakeObject<Presentation>("output.odp");
// 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.odp", SaveFormat::Odp);

Utforska PDF konverteringsalternativ med C++

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