Convert PUB to PPT/PPTX Presentation in C#

PUB to PPT PPTX csharp

Microsoft Publisher, PUB, files are often used for large scale printing of documents like brochures, booklets, posters, etc. In certain situations, you may need to convert a PUB file to a Presentation file as a PPT or PPTX file. This article covers how to convert the publisher files programmatically in C#.

PUB to PPT/PPTX PowerPoint Presentation Converter – C# API Installation

PUB to PPT or PPTX PowerPoint conversion is a two-step process. In the first step, you need to convert a PUB file to a PDF file and then convert the PDF to a PPT or PPTX file. So you need to download the DLL files for Aspose.PUB for .NET and Aspose.PDF for .NET API. Or you can configure these APIs with the NuGet commands below:

PM> Install-Package Aspose.PDF
PM> Install-Package Aspose.PUB

Convert PUB to PPT/PPTX Programmatically in C#

You can convert Microsoft Publisher, PUB, file to PPT or PPTX format PowerPoint Presentation by following the steps below:

  1. Create a MemoryStream object to save intermediate PDF file.
  2. Parse the source PUB file using IPubParser.Parse() method.
  3. Convert the PUB file to PDF and save the output in the MemoryStream.
  4. Load the PDF file and initialize the PptxSaveOptions class instance.
  5. Save the output PPT or PPTX file.

The following code snippet shows how to convert a PUB file to a PPT or PPTX PowerPoint Presentation programmatically in C#:

Try Online Demo

Please try the PUB to PPTX web app developed using this API.

Get Free API License

You can evaluate the API without any limitations by requesting a free temporary license.

Conclusion

In this article, you have learned how to convert Microsoft Publisher, PUB, file to PowerPoint Presentation as a PPT or PPTX file programmatically in C#. Furthermore, you can check other features of the API by visiting the documentation, or get in touch with us via forum.

See Also

Convert PUB to PNG, JPEG, or TIF Image using C#