Skip to end of metadata
Go to start of metadata

 

 

Contents Summary
  

Converting PPT to PPTX

Aspose.Slides for Java now facilitates the developers to access the PPT using Presentation class instance and converting that to respective PPTX format. Presently, it supports partial conversion of PPT to PPTX. For more details about what features are supported and unsupported in PPT to PPTX conversion, please proceed to this documentation link.

Aspose.Slides for Java offers Presentation class that represents a PPTX presentation file. Presentation class can now also access PPT through Presentation when the object is instantiated. The following example shows how to convert a PPT presentation into PPTX Presentation.

 

 

Figure : Source PPT Presentation

The above code snippet generated the following PPTX presentation after conversion

Figure: Generated PPTX presentation after conversion

Converting Presentation to PDF

Aspose.Slides for Java directly writes the information about API and Version Number in output documents. For example, upon rendering Document to PDF, Aspose.Slides for Java populates Application field with value 'Aspose.Slides' and PDF Producer field with value, e.g 'Aspose.Slides v 17.10'.

Please note that you cannot instruct Aspose.Slides for Java to change or remove this information from output Documents.

PDF documents are widely used as a standard format of exchanging documents between organizations, government sectors and individuals. It's a popular format so developers are often asked to convert Microsoft PowerPoint presentation files to PDF documents. Realizing this possible requirement, Aspose.Slides for Java supports converting presentations to PDF documents without using any other component. This topic illustrates how this conversion can be done.

Aspose.Slides for Java offers the Presentation class that represents a presentation file. 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 Presentation to PDF using the 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 Presentation to PDF 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.You can also include comments in generated pdf by using PdfOptions class.

Converting Presentation to PDF including Hidden Slides

The following example shows how to convert a presentation into a PDF document with hidden slides included as provided by the PdfOptions class. It sets the setShowHiddenSlides(boolean) method to generate PDF with hidden slides.

Method setShowHiddenSlides(boolean) has been added to IHtmlOptions, IPdfOption, ISwfOptions, ITiffOptions, IXpsOption interfaces and HtmlOptions, PdfOption, SwfOptions, TiffOptions, XpsOption classes.

This method specifies whether the exported document should include hidden slides or not. Default value is false.

 

Converting Presentation 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 a Specific Slide to PDF

The following example shows how to convert a specific slide in a presentation to a PDF document with custom options.

 

Save to PDF notes with 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 pixels.

 

Converting Presentation to TIFF

TIFF format is known by its flexibility to accommodate multipage images and data. Keeping in view the importance and popularity of TIFF format, Aspose.Slides for Java provides the support for converting presentations into TIFF document.

The Save method exposed by Presentation class can be called by developers to convert the whole presentation into TIFF document. Further, TiffOptions class exposes ImageSize property enabling the developer to define the size of the image if required.

Converting Presentation to TIFF with default size

The following example shows how to convert a presentation into TIFF document with default options.

 

Converting Presentation to TIFF with custom size

The following example shows how to convert a presentation into TIFF document with customized image size using TiffOptions class.

Converting Presentation to TIFF with custom Image Pixel Format

The following example shows how to convert a presentation into TIFF document with customized Image Pixel Format using TiffOptions class. You can also include comments in generated TIFF by using TiffOptions class.

Converting Presentation to XPS

XPS format is also widely used for exchange of data. Aspose.Slides for Java takes care of its importance and provides the built-in support for converting a presentation into XPS document

The save method exposed by Presentation class can be used to convert the whole presentation into XPS document. Further, XpsOptions class exposes SaveMetafileAsPng property that can be set to true or false as per requirement.

Converting Presentation to XPS without XpsOptions

The following example shows how to convert a presentation into XPS document without using options provided by XpsOptions class.

 

Converting Presentation to XPS with XpsOptions

The following example shows how to convert a presentation into XPS document using options provided by XpsOptions class.

 

Converting Presentation to HTML

HTML is one of several widely used format for exchanging data. Aspose.Slides for Java provides support for converting a presentation to HTML which is an embedded SVG.

The Save method exposed by the Presentation class can be used to convert the whole presentation into a HTML document. The HtmlOptions class can be used to set the options.

Converting Presentation to HTML

Saving a PowerPoint presentation to HTML is a two-line process with Aspose.Slides for Java. Simply open the presentation and save it out to HTML. You can also include comments in generated html by using HtmlOptions class.

Exporting Presentation Into Html file with Video

In order to export media files like videos to HTML. Please follow the steps below:

  1. Create an instance of Presentation class.
  2. Get reference of the slide.
  3. Setting the transition effect.
  4. Write the presentation as a PPTX file.

Converting an Individual Slide to HTML

Saving an interdependent PowerPoint slide to individual HTML file per slide is a now possible using Aspose.Slides for Java. Simply open the presentation and save it to HTML. You can also include comments in generated html by using HtmlOptions class.

Render notes when Converting To HTML

New Element HtmlNotes has been added to Aspose.Slides.Export.SaveFormat enumeration. This element allows saving presentation Notes Page View into HTML format. Sample code is given below.

Save CSS and Images when Exporting To HTML 

Now using this feature you can save css and images files separately into folder. In addition, WriteAllFonts method has been added. It allows overriding the way how all fonts contained in the presentation are serialized into HTML.

Please review the example below how to use overridable methods to create a custom HTML document with a link to CSS file.

Preserve Original Fonts While Converting To HTML

Now using this new feature you can preserve original fonts that are used in Presentation while converting to HTML. New Property EmbedAllFontsHtmlController has been added to preserve the original fonts in generated html.

Converting Presentation to Responsive HTML

Now you can export the presentation to Responsive HTML, which will ensure the generate an HTML that will be displayed properly across browsers in different devices. The new class ResponsiveHtmlController has been added to provide the possibility to generate responsive HTML files.

This controller can be used in the same manner as other HTML controllers:

Embed All Fonts When Converting Presentation to HTML

Now, you can export presentation to HTML by embedding all fonts used in presentation. A new HTML controller, EmbedAllFontsHtmlController has been added which is used to embed all presentation fonts in HTML document. Below is an example of using this new controller.  Please note that EmbedAllFontsHtmlController has parameterized constructor where an array of font names can be passed to prevent them from embedding. Some fonts, like Calibri or Arial, used in presentation are not needed to be embedded (which leads the resulting HTML document become larger) because almost every system already has them installed. The EmbedAllFontsHtmlController also supports inheritance and WriteFont method that is intended to be overridden:

Converting Presentation with Notes

Aspose.Slides for Java provides Conversion to TIFF and Conversion to PDF in order to convert slides with notes.

Converting Presentation in Notes Slide View to TIFF

TIFF is one of several widely used image formats that Aspose.Slides for Java supports for converting a presentation with notes to images. The save method exposed by the Presentation class can be used to convert the whole presentation in Notes Slide view to TIFF.You can also generate a slide thumbnail in Notes Slide view for individual slides.

 

The above code snippets update the sample presentation to TIFF images in Notes Slide view, as shown below:

The source presentation view with slide notes

 

 

The generated TIFF image in Notes Slide view

 

 

Converting Presentation in Notes Slide View to PDF

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 Java is a two-line process. You simply need to open the presentation and save it out to PDF notes.

Converting Presentation to SWF

The Save method exposed by Presentation class can be used to convert the whole presentation into SWF document. The following example shows how to convert a presentation into SWF document by using options provided by SWFOptions class.You can also include comments in generated swf by using SWFOptions class.

 

Labels
  • No labels