Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 16, 2022 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/b855f5608c8ffdb551c3655b00c97d15 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/b855f5608c8ffdb551c3655b00c97d15 to your computer and use it in GitHub Desktop.
Convert EPUB to XPS Programmatically using Java
// Create an instance of XpsSaveOptions
XpsSaveOptions options = new XpsSaveOptions();
// Set page size in inches
options.getPageSetup().setAnyPage(new Page(new Size(Length.fromInches(7), Length.fromInches(3))));
// Call the convertEPUB method to convert EPUB to XPS
Converter.convertEPUB("input.epub", options, "output.xps");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment