You can find more details at: Convert PUB to PPT/PPTX Presentation in C#
Last active
January 13, 2022 09:08
-
-
Save aspose-com-gists/00999c84848fd959194e66a1d1dc73e2 to your computer and use it in GitHub Desktop.
Convert PUB to PPT PPTX PowerPoint Presentation Programmatically in C# .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string fileName = "Test.pub"; | |
// Initialize a MemoryStream to hold output document | |
MemoryStream stream = new MemoryStream(); | |
// Load input PUB file | |
IPubParser parser = PubFactory.CreateParser(fileName); | |
// Parse the input publisher file | |
Aspose.Pub.Document doc = parser.Parse(); | |
// Convert the PUB file to PDF and save result in a MemoryStream | |
PubFactory.CreatePdfConverter().ConvertToPdf(doc, stream); | |
// Load input PDF file from the MemoryStream | |
Document document = new Document(stream); | |
// Initialize PptxSaveOptions class object | |
PptxSaveOptions options = new PptxSaveOptions(); | |
// Save output presentation file (PPT/PPTX) | |
document.Save("Output.pptx", options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment