Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 22, 2021 20:28
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/a6df66d24893ee919fee1d9fd3fc8b06 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/a6df66d24893ee919fee1d9fd3fc8b06 to your computer and use it in GitHub Desktop.
Convert HTML to PDF on Linux Programmatically in Java
// Initialize an HTML document from the input file
HTMLDocument document = new HTMLDocument("document.html");
// Initialize PdfSaveOptions class object
PdfSaveOptions options = new PdfSaveOptions();
// Convert HTML to PDF
Converter.convertHTML(document, options, "output.pdf");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment