Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// For complete examples and data files, please go to
try {
// Setup GroupDocs.Viewer config
ViewerConfig config = Utilities.getConfiguration();
// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
PdfFileOptions options = new PdfFileOptions();
// Get file as pdf
FileContainer container = imageHandler.getPdfFile(fileName, options);
// Save file
Utilities.saveAsFile(fileName, container.getStream(), ".pdf");
} catch (Exception exp) {
System.out.println("Exception: " + exp.getMessage());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.