Supported File Formats
GemBox.Presentation supports multiple file formats with varying degree of support.
File format support
GemBox.Presentation supports the following file formats:
Input only:
- Microsoft PowerPoint 97-2003 Presentation (PPT).
Input and output:
- Microsoft PowerPoint Presentation (PPTX).
Output only:
- Adobe Portable Document Format (PDF).
- Microsoft XML Paper Specification (XPS).
- Image formats (PNG, JPEG, GIF, BMP, TIFF, WMP).
Supporting a file format as an input file format means that GemBox.Presentation is able to read the specified file format and supporting it as an output file format means that GemBox.Presentation is able to write to the specified file format.
GemBox.Presentation support for file formats depends on the used framework as following:
Additional conversion outputs
In addition to exporting to a file or a stream, GemBox.Presentation also supports printing a presentation (Print() method) and converting a presentation to the following types:
- XpsDocument using the PresentationDocument.ConvertToXpsDocument(XpsSaveOptions) method and
- ImageSource using the PresentationDocument.ConvertToImageSource(ImageSaveOptions) method.
These outputs are especially useful in WPF applications, by providing a means to embed a presentation in your WPF application with DocumentViewer and Image controls, as shown in our GemBox.Presentation WPF examples.
Following code snippet shows how to assign a PresentationDocument instance to DocumentViewer and Image controls:
// Assign a PresentationDocument instance to DocumentViewer control.
documentViewer.Document = presentation.ConvertToXpsDocument(SaveOptions.Xps).GetFixedDocumentSequence();
// Assign a PresentationDocument instance to Image control.
image.Source = presentation.ConvertToImageSource(SaveOptions.Image);
Support level for PPTX and PPT format
GemBox.Presentation supports most of the Microsoft PowerPoint Presentation (PPTX) and PowerPoint 97-2003 Presentation (PPT) features through its API, but not all.
For example, GemBox.Presentation doesn't support charts, SmartArt graphics, animations, themes and handout master slide through its API.
Although not supporting all Microsoft PowerPoint Presentation (PPTX) features through its API, GemBox.Presentation allows you to preserve the unsupported features, so you don't lose any relevant presentation content when loading and saving a presentation to PPTX format.
For more information, see Preservation and Charts and Diagrams example.
Support level for PDF, XPS and image formats
Exporting a presentation to a fixed document file format, such as PDF and XPS, and to image formats is accomplished with GemBox.Presentation internal renderer that is commonly used for all formats mentioned.
This means that PDF, XPS and image formats share the same level of support for presentation features, since they are all rendered in the same way.
The following list contains GemBox.Presentation API members that are, currently, not supported when exporting to PDF, XPS and image formats:
- Fill and Fill properties whose FillType is Gradient, Pattern, Picture or SlideBackground.
- LineFormat properties:
- TextBoxFormat properties:
- TextParagraphFormat properties SpacingBefore and SpacingAfter if IsPercent is
true
. - TextCharacterFormat properties:
- Offset (partially supported - all positive values are exported in the same superscript position and all negative values are exported in the same subscript position),
- EqualizeCharacterHeight,
- Kerning.
- ShapeGeometryType all fields except Line, Rectangle, RoundedRectangle, Oval, SnipSingleCornerRectangle, SnipSameSideCornerRectangle, SnipDiagonalCornerRectangle, IsoscelesTriangle, RightTriangle, Parallelogram, Trapezoid, Diamond, RegularPentagon, Hexagon, Octagon, RightArrow, LeftArrow, UpArrow, DownArrow, LeftRightArrow, UpDownArrow, Pentagon, RectangularCallout, RoundedRectangularCallout and OvalCallout.
- HorizontalAlignment fields Distributed, JustifyLow and DistributedThai.
- VerticalAlignment fields Justify and Distributed.
- TextDirection fields Stacked, StackedRightToLeft, Rotate90EastAsian and Rotate90Mongolian.
- UnderlineStyle fields Heavy, DottedHeavy, DashHeavy, DashLong, DashLongHeavy, DotDashHeavy, DotDotDashHeavy, Wavy, WavyHeavy and WavyDouble.
- ActionType fields HyperlinkToLastSlideViewed, HyperlinkToEndShow, HyperlinkToCustomShow, RunMacro, PlayMedia and ObjectAction.
Note
Support for these members will be added in future versions of GemBox.Presentation based on customer feedback.
Support for ISO-standardized versions of the Portable Document Format (PDF)
GemBox.Presentation supports writing to PDF/A, the ISO-standardized version of the Portable Document Format (PDF) specialized for long-term archiving of electronic documents.
The following list contains conformance levels that are currently supported when exporting to PDF format:
- PDF/A-1a,
- PDF/A-1b,
- PDF/A-2a,
- PDF/A-2b,
- PDF/A-2u,
- PDF/A-3a,
- PDF/A-3b,
- PDF/A-3u.
Support for Partially Trusted applications
Most of the Internet Service Providers restrict hosted ASP.NET applications to Medium Level Trust and by doing so, disable accessing files outside the application directory, among other things, as explained in trust Element (ASP.NET Settings Schema) level Attribute.
GemBox.Presentation support for Partially Trusted applications depends on the used file formats as follows:
- PowerPoint Presentation (PPTX) and PowerPoint 97-2003 Presentation (PPT) are fully supported in Partially Trusted applications.
- Adobe Portable Document Format (PDF) is supported in Partially Trusted applications if font location is set to a directory that is available to the Partially Trusted application.
Important
Setting the font location directory is necessary for Partially Trusted applications because they can only access files inside the application directory, and font files are, by default, located in C:\Windows\Fonts, which is restricted to Partially Trusted applications. For more information on how to set font location directory, see Private Fonts example. Font files are, usually, copyrighted, so make sure you conform to the font license, before copying a font file to another location.
- Creating a digitally signed PDF file is not supported in Partially Trusted applications because ComputeSignature() does not work in partial trust.
- Microsoft XML Paper Specification (XPS) is not supported in Partially Trusted applications because ReachFramework.dll assembly, where most of the XPS implementation resides, is not decorated with AllowPartiallyTrustedCallersAttribute.
- Image formats (PNG, JPEG, GIF, BMP, TIFF, WMP) are not supported in Partially Trusted applications because BitmapEncoder class and its derived classes, used for writing image data to the specific image file format, do not work in partial trust.
- Printing is not supported in Partially Trusted applications because it uses XPS infrastructure.