PowerPoint to PDF Element |
PowerPointToPdfElement draws the slides of a PowerPoint presentation (.pptx, .pptm, .potx, .potm) at a position on a PDF page, like Word to PDF Element does for a Word document. Each slide - or notes page, or handout page - keeps its shape, scaled to the width of the element; the slides are stacked one under the other and continue on the following pages.
using ExpertPdf.Anywhere.PdfDocument; Document document = new Document(); PdfPage page = document.AddPage(); PdfFont font = document.AddFont(StdFontBaseFamily.HelveticaBold); page.AddElement(new TextElement(0, 0, "Quarterly review", font)); // the slides below the title, 300 points wide, stacked; they continue on new pages PowerPointToPdfElement slides = new PowerPointToPdfElement(0, 30, 300, "deck.pptx"); page.AddElement(slides); document.Save("review.pdf"); document.Close();
The constructors take the position, optionally a width and a height, and a file path or a stream. With a height, only that much of the presentation is drawn.
Publish, SlidesPerHandout, ShowHiddenSlides, Password and PageRanges: as on the PowerPoint to PDF converter - "3" draws only the third slide.
LiveUrlsEnabled and InternalLinksEnabled: keep the links of the presentation.
Tagged: in a tagged document, the slides' titles, text, tables, pictures and links join the structure of the document.
PdfPagesRectangles: after the element is added, where each slide was drawn.
A slide can also be drawn in the header or footer of an HTML to PDF conversion with PowerPointToPdfArea; see Headers and Footers.