Convert to Presentation with advanced options

GroupDocs.Conversion provides the PresentationConvertOptions class to give you better control over conversion results while converting to presentation formats. Along with common convert options from the base class, the PresentationConvertOptions has the following additional options:

  • setFormat specifies desired result document type. Available options are: Ppt, Pps, Pptx, Ppsx, Odp, Otp, Potx, Pot, Potm, Pptm, Ppsm.
  • setPassword whether the converted document will be password-protected with the specified password.
  • setZoom specifies the zoom level in percentage.

The following code snippet shows how to convert to presentations with advanced options:

import com.groupdocs.conversion.Converter;
import com.groupdocs.conversion.filetypes.PresentationFileType;
import com.groupdocs.conversion.options.convert.PresentationConvertOptions;
import com.groupdocs.conversion.options.load.WordProcessingLoadOptions;
...
Converter converter = new Converter("sample.docx");
PresentationConvertOptions options = new PresentationConvertOptions();
options.setPageNumber(2);
options.setPagesCount(1);
options.setFormat(PresentationFileType.Ppt);
converter.convert("converted.ppt", options);