GroupDocsGists
10/24/2017 - 1:12 PM

Examples-GroupDocs.Conversion.Examples.Java-src-main-java-com-groupdocs-conversion-examples-Conversion-usePageModeConvertingToPdf.java

// For complete examples and data files, please go to https://github.com/groupdocs-conversion/GroupDocs.Conversion-for-Java
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setOutputType(OutputType.String);
saveOptions.setPageMode(true);

// Note: when using PageMode expected result is either IList<string> or
// IList<Stream> depending
// of used OutputType in save options provided
List<String> resultPaths = conversionHandler.<List<String>> convert(sourceFileName, saveOptions);
for (String path : resultPaths) {
	System.out.println(path);
}