Supported File Formats
GemBox.Presentation supports multiple file formats with varying degree of support.
The following sections explain file formats support in more detail and present other, file format specific, valuable information:
GemBox.Presentation supports the following file formats:
Microsoft PowerPoint 97-2003 Presentation (PPT).
Microsoft PowerPoint Presentation (PPTX).
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:
In addition to exporting to a file or a stream, GemBox.Presentation also supports printing a presentation (PresentationDocumentPrint method) and converting a presentation to the following types:
XpsDocument using the PresentationDocumentConvertToXpsDocument(XpsSaveOptions) method and
ImageSource using the PresentationDocumentConvertToImageSource(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.
// 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);
' 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)
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.
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:
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.
Support for these members will be added in future versions of GemBox.Presentation based on customer feedback.
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.
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.