PDF to HTML
The Documentize PDF Converter for .NET provides robust capabilities for converting documents PDF to HTML format, ideal for web applications, archiving, and report generation. With multiple options for handling resources and layouts, the converter adapts to various project requirements.
Converting PDF to HTML
Convert PDF files to HTML to make documents accessible for web-based viewing or integration into applications where HTML format is preferred.
- Configure Options: Use
PdfToHtmlOptionsto customize output, choosing either embedded or external resources. - Define Input and Output Paths: Set the paths for your input PDF and output HTML.
- Execute the Conversion: Call the
Convertmethod ofPdfConverterto convert the file.
Example: Convert PDF to HTML with Embedded Resources
1// Create PdfToHtmlOptions object to set output data type as file with embedded resources
2var options = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
3// Add input file path
4options.AddInput(new FileDataSource("path_to_input.pdf"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_output.html"));
7//Perform the process
8PdfConverter.Convert(options);Available Options for PDF to HTML Conversion
- SaveDataType:
FileWithEmbeddedResources: Generates a single HTML file with all resources embedded.FileWithExternalResources: Saves resources separately, ideal for large HTML files.