PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
ComPDF Conversion SDK provides the PDF to HTML function, which can convert PDF files to HTML files while maintaining the layout and format of the original document.
| Option | Description |
|---|---|
HtmlOption::SINGLE_PAGE | Convert the entire PDF into a single HTML file. |
HtmlOption::SINGLE_PAGE_WITH_BOOKMARK | Convert the PDF into a single HTML file with a bookmark navigation bar. |
HtmlOption::MULTI_PAGE | Convert the PDF into multiple HTML files, one file per page. |
HtmlOption::MULTI_PAGE_WITH_BOOKMARK | Convert the PDF into multiple HTML files with an outline page for navigation. |
options = ComPDFKitConversion::ConvertOptions.new
options.html_option = ComPDFKitConversion::HtmlOption::SINGLE_PAGE
result = ComPDFKitConversion::Conversion.start_pdf_to_html(
input_file_path,
"",
output_file_path,
options
)