Converting Presentation to PDF
To convert a Presentation to PDF in C++ simply pass the file name and save format to the Save method. The Presentation class exposes the Save method that can be called to convert the whole presentation into a PDF document. The PdfOptions class provides options for creating the PDF such as JpegQuality, TextCompression, Compliance and others. These options can be used to get the desired standard of PDF.
Converting using Default Options
The following example shows how to convert a presentation into a PDF document using the default options. The default options create a PDF document of maximum quality.
Converting using Custom Options
The following example shows how to convert a presentation into a PDF document with customized options as provided by the PdfOptions class. It sets the JPEG quality, saves metafiles to PNG, sets text compression level and PDF standard.
Converting with Hidden Slides Included
The following example shows how to convert a presentation into a PDF document with hidden slides included as provided by the PdfOptions class. You can also include comments in generated PDF by using PdfOptions class. It sets the ShowHiddenSlides property to generated PDF with hidden slides. Property ShowHiddenSlides has been added to IHtmlOptions, IPdfOption, ISwfOptions, ITiffOptions, IXpsOption interfaces and HtmlOptions, PdfOption, SwfOptions, TiffOptions, XpsOption classes. This property specifies whether the exported document should include hidden slides or not. Default value is "false".
Converting to Password Protected PDF
The following example shows how to convert a presentation to a password protected PDF document with customized options as provided by the PdfOptions class.
Converting Specific Slide
The following example shows how to convert a specific presentation slide to a PDF document with custom options.
Converting the custom slide size
The following example shows how to convert a presentation to a PDF notes document with custom slide size. Where each inch equals 72.
Converting the Notes Slide View
The Save method exposed by Presentation class can be used to convert the whole presentation in Notes Slide view to PDF. Saving a Microsoft PowerPoint presentation to PDF notes with Aspose.Slides for C++ is a two-line process. You simply open the presentation and save it out to PDF notes. The code snippets below update the sample presentation to PDF in Notes Slide view.
Set PDF Access Permissions
You can set access permissions to a PDF document using Aspose.Slides for C++. For this purpose, method has been added to a class. The possible values which allow you to restrict access rights to a PDF document are defined in the class.
The following code demonstrates how you can set access permissions to a PDF document only for printing.