Click or drag to resize

PowerPoint to PDF Converter

The PowerPoint to PDF converter, PdfConverter, converts PowerPoint presentations (.pptx, .pptm, .potx, .potm) to PDF without Microsoft PowerPoint: one page per slide, the notes pages, or handouts with several slides on a page. The presentation is laid out by a presentation engine in the library, on Windows, Linux and macOS.

Converting a presentation
using ExpertPdf.Anywhere.PowerPointToPdf;

PdfConverter converter = new PdfConverter();
// converter.LicenseKey = "your license key";

converter.SavePdfFromPowerPointFileToFile("deck.pptx", "deck.pdf");

The presentation can come from a file, a stream or bytes (GetPdfBytesFromPowerPointFile, GetPdfBytesFromPowerPointStream, GetPdfBytesFromPowerPointBytes, and the SavePdfFrom... methods). A password protected presentation needs Password. A presentation that cannot be read fails with PowerPointConvertException.

Slides, notes pages or handouts

Publish chooses what is converted: PowerPointPublish.Slides (the default, one page per slide), PowerPointPublish.NotesPages (each slide with its speaker notes below it) or PowerPointPublish.Handouts (pages with SlidesPerHandout slides each: 1, 2, 3, 4, 6 or 9). Hidden slides are left out unless ShowHiddenSlides is set.

By default (PageSetup = PowerPointPageSetup.Document) every page has the size of the slides. With PowerPointPageSetup.Options the slides are scaled onto the page size, orientation and margins of PdfDocumentOptions:

PdfConverter converter = new PdfConverter();
converter.Publish = PowerPointPublish.Handouts;
converter.SlidesPerHandout = 4;
converter.PageSetup = PowerPointPageSetup.Options;
converter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
converter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
byte[] pdf = converter.GetPdfBytesFromPowerPointFile("deck.pptx");
Other options
  • PageRanges: convert only some pages, for example "1-3,5".

  • EmbedCompleteFonts: embed whole fonts rather than the characters used; OptimizeIdenticalImages: store an image used several times once.

  • PreserveFormFields: keep the form fields of the presentation as PDF form fields.

  • PdfStandardSubset and AccessibilityStandard: PDF/A, PDF/X and tagged PDF/UA output - the slides' titles, text, tables, pictures with their descriptions and links; set Language and the title for an accessible document. Notes pages and handouts are not produced as tagged documents: publish the slides for one.

  • The header and footer options (title, footer text, page numbers, a Word document as header or footer with WordToPdfArea), the security options and the document information work as they do for the HTML to PDF converter.

A font the presentation uses and the host does not have is replaced by a font with the same metrics; on Linux and macOS hosts without fonts, add the ExpertPdf.Anywhere.Fonts package.

See Also