Last active
February 18, 2021 11:42
-
-
Save GroupDocsGists/bba9bf2911d17f33dc678fb9373e6c0e to your computer and use it in GitHub Desktop.
Convert Convert Presentations to PDF in Java | PPT, PPTX, ODP, etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert consecutive slides of presentation to PDF in Java | |
Converter converter = new Converter("presentation.pptx"); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
options.setPageNumber(2); | |
options.setPagesCount(3); | |
converter.convert("PptConsecutiveSlidesToPDF.pdf", options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert password protected presentation to PDF in Java | |
PresentationLoadOptions loadOptions = new PresentationLoadOptions(); | |
loadOptions.setPassword("GroupDocs"); | |
Converter converter = new Converter("presentation.pptx", loadOptions); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
converter.convert("pwdPptToPDF.pdf", options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert Presentations to PDF in Java using Document Conversion API | |
Converter converter = new Converter("presentation.pptx"); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
converter.convert("pptxToPDF.pdf", options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert specified slides of presentation to PDF in Java | |
Converter converter = new Converter("presentation.pptx"); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
options.setPages(Arrays.asList( 2, 4)); | |
converter.convert("PptSpecificSlidesToPDF.pdf", options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment