Skip to content

Instantly share code, notes, and snippets.

@sroycode
Created January 26, 2022 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sroycode/a6ff306f5c499f0fcb0a0293876c4dde to your computer and use it in GitHub Desktop.
Save sroycode/a6ff306f5c499f0fcb0a0293876c4dde to your computer and use it in GitHub Desktop.
Aspose converting PDF to PPTX
#include <DOM/NullableBool.h>
#include <DOM/DocumentProperties.h>
#include <system/io/directory.h>
#include <Util/License.h>
#include <system/console.h>
#include <system/exception.h>
#include <Export/SaveFormat.h>
#include <DOM/Presentation.h>
#include <system/string.h>
#include <DOM/ISlide.h>
#include <DOM/ISlideCollection.h>
#include <iostream>
#include <exception>
using License = Aspose::Slides::License;
using Presentation = Aspose::Slides::Presentation;
using ISlide = Aspose::Slides::ISlide;
using ISlideCollection = Aspose::Slides::ISlideCollection;
using SaveFormat = Aspose::Slides::Export::SaveFormat;
int main ()
{
try {
System::SharedPtr<Aspose::Slides::License> lic = System::MakeObject<Aspose::Slides::License>();
lic->SetLicense(System::String("Aspose.Slides.C++.lic"));
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>();
System::SharedPtr<ISlideCollection> cols = pres->get_Slides();
cols->AddFromPdf(System::String("test.pdf"));
pres->Save(System::String("test.pptx"), SaveFormat::Pptx);
}
catch(std::exception& e) {
std::cerr << "Error " << e.what() << std::endl;
}
catch(...) {
std::cerr << "Unknown Error " << std::endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment