Load Presentation document with options

GroupDocs.Conversion provides PresentationLoadOptions to give you control over how Microsoft PowerPoint or Open Document presentation will be converted into target format. The following options could be set:

  • Format - the document type is auto detected during loading, however you can specify explicitly the type of the source presentation document. Available options are: Ppt, Pps, Pptx, Ppsx, Odp, Otp, Potx, Pot, Potm, Pptm, Ppsm
  • DefaultFont - default font for rendering the presentation. The following font will be used if a presentation font is missing.
  • FontSubstitutes - substitute specific fonts from the source presentation document
  • Password -  password to unlock protected document
  • HideComments - specifies that comments from source presentation must be hidden during conversion
  • ShowHiddenSlides - specifies that hidden slides should be included in converted document

Hide comments

Like many other Microsoft Office applications PowerPoint provides “Comments” feature to simplify the presentation review. By default Comments pane will be present in a converted document. In case you want to hide comments set HideComments to *true *as shown in a code sample below:

Contracts.Func<LoadOptions> getLoadOptions = () => new PresentationLoadOptions
{
    HideComments = true
};
using (Converter converter = new Converter("sample.pptx", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}

Specify font substitutions

Original PowerPoint presentations may use some specific and non-standard fonts for text formatting that are not available at the time of conversion. GroupDocs.Conversion for .NET allows you to provide substitutions for missing fonts by setting FontSubstitues collection with original/substitute font pairs.

The following code sample shows how to convert PPTX presentation and specify substitutions for missing fonts:

Contracts.Func<LoadOptions> getLoadOptions = () => new PresentationLoadOptions
{
    DefaultFont = "Helvetica",
    FontSubstitutes = new List<FontSubstitute>
    {
       FontSubstitute.Create("Tahoma", "Arial"),
       FontSubstitute.Create("Times New Roman", "Arial"),
    }
};
using (Converter converter = new Converter("sample.pptx", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}

Include hidden slides

Just like you are able to show or hide slides in a Microsoft PowerPoint presentation manually, GroupDocs.Conversion for .NET allows to display hidden slides in a converted document programmatically (by default all hidden slides are excluded from converted document). You just have to set ShowHiddenSlides property to true.

The following code sample shows how to convert PPTX presentation including the hidden slides:

Contracts.Func<LoadOptions> getLoadOptions = () => new PresentationLoadOptions
{
    ShowHiddenSlides = true
};
using (Converter converter = new Converter("sample.pptx", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online Document Converter Apps

Along with full-featured .NET library we provide free Apps and free services for document conversion. In order to see a full potential of GroupDocs.Conversion, you are welcome to convert DOC to PDF, DOC to XLSX, PDF to DOC, PDF to XLSX, PPT to DOC and more with Free Online Document Converter App or get a full advantage of Free Online Document Converter Suite with advanced conversion settings and many more enterprise built-in features.

Please note that more premium features, advanced options and enhanced document management experience is available for signed-in users at conholdate.app for FREE.
If you don’t own an account yet, register it now for free! No credit card is required!