Last active
June 9, 2021 06:52
-
-
Save aspose-com-gists/8fe7879cbd2b52f75da4035617105d2e to your computer and use it in GitHub Desktop.
Convert PDF to HTML in Java | https://blog.aspose.com/2021/06/08/convert-pdf-to-html-in-java/
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
// Load the source PDF document | |
Document pdfDocument = new Document("PDFToHTML.pdf"); | |
// Instantiate HTMLSaveOptions | |
HtmlSaveOptions htmlOptions = new HtmlSaveOptions(); | |
// Split the output into multiple pages | |
htmlOptions.setSplitIntoPages(true); | |
// Save the PDF file as HTML | |
pdfDocument.save("pdf-to-html.html", htmlOptions); |
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
// Load the source PDF document | |
Document pdfDocument = new Document("PDFToHTML.pdf"); | |
// Save the PDF file as HTML | |
pdfDocument.save("pdf-to-html.html", SaveFormat.Html); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read the complete article: https://blog.aspose.com/2021/06/08/convert-pdf-to-html-in-java/