Related Article(s):
Last active
January 20, 2023 06:29
-
-
Save GroupDocsGists/6640834bf7f4c409e74e90a29b633d0b to your computer and use it in GitHub Desktop.
How to 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
import com.groupdocs.conversion.Converter; | |
import com.groupdocs.conversion.options.convert.MarkupConvertOptions; | |
... | |
// Convert PDF to HTML in Java | |
Converter converter = new Converter("path/document.pdf"); | |
converter.convert("path/converted-pdf-to.html", new MarkupConvertOptions()); |
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
// Convert selected pages of password protected PDF to HTML in Java | |
import com.groupdocs.conversion.Converter; | |
import com.groupdocs.conversion.options.convert.MarkupConvertOptions; | |
import com.groupdocs.conversion.options.load.PdfLoadOptions; | |
... | |
PdfLoadOptions loadOptions = new PdfLoadOptions(); | |
loadOptions.setPassword("pdf-password-12345"); | |
Converter converter = new Converter("path/protected-document.pdf", loadOptions); | |
MarkupConvertOptions options = new MarkupConvertOptions(); | |
options.setPageNumber(2); | |
options.setFixedLayout(true); | |
options.setPagesCount(1); | |
converter.convert("path/converted-adv-pdf-to-.html", options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment