PDF Converter
Convert PDF to HTML with Documentize's .NET tools—preserve layout and formatting for consistent, professional results.
Convert PDFs to Word documents with Documentize's .NET tools—preserve formatting and structure for easy editing.
Convert HTML to PDF with Documentize's .NET tools—preserve layout and formatting for consistent, professional results.
Convert PDFs to JPEG images with Documentize's .NET tools—extract high-quality images from your documents effortlessly.
Convert PDFs to PDF/A format with Documentize's .NET tools—ensure long-term archiving and compliance with ease.
Convert PDFs to PNG images with Documentize's .NET tools—extract high-quality images for web and graphic use.
Convert PDFs to TIFF images with Documentize's .NET tools—extract high-resolution images for professional document management.
Convert PDFs to Excel with Documentize's .NET tools—extract tables and data quickly for seamless analysis and processing.
Subsections of PDF Converter
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
PdfToHtmlOptions to 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
Convert method of PdfConverter to 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.
PDF to DOC
The Documentize PDF Converter for .NET is a powerful tool designed to convert PDF documents into DOC or DOCX formats. This plugin seamlessly transforms PDF pages into editable Microsoft Word documents, making it easy to reuse, edit, and share content across multiple platforms.
How to Convert PDF to DOC/DOCX
To convert a PDF document to DOC/DOCX format, follow these steps:
- Create an instance of
PdfToDocOptions to configure the conversion process. - Add the input PDF file using the
AddInput method. - Add the output file path for the resulting file using the
AddOutput method. - Run the
Convert method to execute the conversion.
1// Create PdfToDocOptions object to set instructions
2var options = new PdfToDocOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_result_file.doc"));
7// Perform the process
8PdfConverter.Convert(options);
Converting PDF to DOC with Custom Options
The PDF to DOC Converter plugin provides several options to customize your conversion process. You can choose between different modes to control how the layout and structure of the PDF are handled during conversion.
1// Create PdfToDocOptions object to set instructions
2var options = new PdfToDocOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_result_file.doc"));
7// Set Mode
8options.Mode = DocConversionMode.Flow;
9// Perform the process
10PdfConverter.Convert(options);
Key Features:
- DOC/DOCX Conversion: Convert PDF documents to editable Microsoft Word formats (DOC or DOCX).
- Maintain Formatting: Retain the original layout, text, and formatting during the conversion process.
- Custom Conversion Options: Fine-tune the conversion process with different modes, like Enhanced Flow, for better layout.
HTML to PDF
The Documentize PDF Converter for .NET provides robust capabilities for converting documents between HTML to PDF 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 HTML to PDF
Transform HTML content into high-quality PDFs, perfect for generating printable reports, archiving web content, or creating shareable document formats.
To convert an HTML document to a PDF, follow these steps:
- Configure Options: Use
HtmlToPdfOptions to define layout and media settings. - Specify Paths: Set input HTML and output PDF file paths.
- Execute the Conversion: Run the
Convert method of PdfConverter to convert the file.
Example: Convert HTML to PDF
1// Create HtmlToPdfOptions
2var options = new HtmlToPdfOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_input.html"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_output.pdf"));
7//Perform the process
8PdfConverter.Convert(options);
Additional Options for HTML to PDF Conversion
Media Type:
HtmlMediaType.Print: Ideal for generating PDFs suited for printing.HtmlMediaType.Screen: Use when converting content designed for digital viewing.
Layout Adjustments:
PageLayoutOption: Adjusts how HTML content fits the PDF layout, like ScaleToPageWidth to ensure the content scales to the PDF width.IsRenderToSinglePage: Enables rendering the entire HTML content on a single PDF page if needed for concise presentations.
This converter is versatile for a variety of applications, from generating PDF reports based on web content to converting archives of PDF documents for web-based accessibility. For more advanced configurations, refer to the full Documentize documentation.
PDF to JPEG
The Documentize PDF Converter for .NET is a powerful tool that simplifies the conversion of PDF documents into high-quality JPEG images. This plugin is designed to make your content more accessible across platforms by transforming PDF pages into widely-used image formats.
How to Convert PDF Pages to JPEG
To convert a PDF document into JPEG images, follow these steps:
- Create an instance of
PdfToJpegOptions to configure the conversion process. - Add the input PDF File using the
AddInput method. - Set the output Directory path for the JPEG images using the
AddOutput method. - Run the
Convert method to convert the PDF pages into JPEG images.
1// Create PdfToJpegOptions object to set instructions
2var options = new PdfToJpegOptions();
3// Add input File path
4options.AddInput(new FileDataSource("path_to_input.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
7// Perform the process
8PdfConverter.Convert(options);
Customizing PDF to JPEG Conversion
You can customize the conversion process by adjusting resolution, selecting page ranges, or setting image quality. Here’s how to convert the first page of a PDF at 200 DPI:
1// Create PdfToJpegOptions object to set instructions
2var options = new PdfToJpegOptions();
3// Process only the first page
4options.PageList = [1];
5// Set output resolution to 200 DPI
6options.OutputResolution = 200;
7// Set output quality to 50
8options.Quality = 50;
9// Add input File path
10options.AddInput(new FileDataSource("path_to_input.pdf"));
11// Set output Directory path
12options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
13// Perform the process
14PdfConverter.Convert(options);
The Convert method returns a ResultContainer object that holds information about the conversion results. You can get streams of the converted JPEG files as shown below:
1// Create PdfToJpegOptions object to set instructions
2var options = new PdfToJpegOptions();
3// Add input File path
4options.AddInput(new FileDataSource("path_to_input.pdf"));
5// Perform the process
6var results = PdfConverter.Convert(options);
7// Get stream results
8foreach (var result in results.ResultCollection)
9{
10 var streamResultPage1 = result.ToStream();
11}
Key Features:
- Convert PDF to JPEG: Effortlessly convert entire PDF documents or specific pages into JPEG images.
- Custom Resolution: Adjust the resolution (e.g., 300 dpi) for high-quality outputs.
- Page set: Select specific pages for conversion.
- Quick Conversion: Fast and efficient process with minimal effort.
PDF to PDF/A
The Documentize PDF Converter for .NET is a powerful tool designed to convert PDF documents into the PDF/A format, ensuring that your content remains compliant with long-term archiving standards. This plugin also supports validating existing PDF documents for PDF/A compliance, offering both conversion and validation features in a single solution.
How to Convert PDF to PDF/A
To convert a PDF document into PDF/A format, follow these steps:
- Create an instance of
PdfToPdfAOptions to configure the conversion. - Specify the desired PDF/A version (e.g., PDF/A-3B).
- Add the input PDF file using the
AddInput method. - Add the output file for the resulting PDF/A using the
AddOutput method. - Call the
Convert method to execute the conversion.
1// Create the options class to set up the conversion process
2var options = new PdfToPdfAOptions
3{
4 PdfAVersion = PdfAStandardVersion.PDF_A_3B
5};
6
7// Add the source file
8options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf")); // replace with your actual file path
9
10// Add the path to save the converted file
11options.AddOutput(new FileDataSource("path_to_the_converted_file.pdf"));
12
13// Run the conversion
14PdfConverter.Convert(options);
Validating PDF/A Compliance
You can validate existing PDF files for PDF/A compliance using the PdfAValidateOptions class.
1// Create the options class to set up the validation process
2var options = new PdfAValidateOptions
3{
4 PdfAVersion = PdfAStandardVersion.PDF_A_1A
5};
6
7// Add one or more files to be validated
8options.AddInput(new FileDataSource("path_to_your_first_pdf_file.pdf")); // replace with your actual file path
9options.AddInput(new FileDataSource("path_to_your_second_pdf_file.pdf"));
10// add more files as needed
11
12// Run the validation and get results
13var resultContainer = PdfConverter.Validate(options);
14
15// Check the resultContainer.ResultCollection property for validation results for each file:
16for (var i = 0; i < resultContainer.ResultCollection.Count; i++)
17{
18 var result = resultContainer.ResultCollection[i];
19 var validationResult = (PdfAValidationResult) result.Data;
20 var isValid = validationResult.IsValid; // Validation result for the i-th document
21}
Key Features:
- Convert to PDF/A: Seamlessly transform PDF files into the PDF/A format (such as PDF/A-1a, PDF/A-2b, PDF/A-3b) to ensure compliance with archiving standards.
- Validate PDF/A Compliance: Check existing PDF documents for conformance with PDF/A standards and identify issues if they do not comply.
- Efficient Workflow: Minimize time and effort with fast and reliable conversion processes.
PDF to PNG
The Documentize PDF Converter for .NET is an advanced tool that allows you to convert PDF documents into high-quality PNG images. This plugin is designed to make your content more versatile, accessible, and easier to share by transforming PDF pages into widely supported image formats.
How to Convert PDF to PNG
To convert a PDF document into PNG images, follow these steps:
- Create an instance of
PdfToPngOptions to configure the conversion process. - Add the input PDF File using the
AddInput method. - Set the output Directory path for the PNG images using the
AddOutput method. - Run the
Convert method to convert the PDF pages into PNG images.
1// Create PdfToPngOptions object to set instructions
2// Create PdfToPngOptions object to set instructions
3var options = new PdfToPngOptions();
4// Add input File path
5options.AddInput(new FileDataSource("path_to_input.pdf"));
6// Set output Directory path
7options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
8// Perform the process
9PdfConverter.Convert(options);
Customizing PDF to PNG Conversion
You can customize the conversion by adjusting the resolution and selecting specific pages. For example, to convert only the first page of a PDF at 200 DPI:
1// Create PdfToPngOptions object to set instructions
2var options = new PdfToPngOptions()
3// Process only the first page
4options.PageList = [1];
5// Set output resolution to 200 DPI
6options.OutputResolution = 200;
7// Add input File path
8options.AddInput(new FileDataSource("path_to_input.pdf"));
9// Set output Directory path
10options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
11// Perform the process
12PdfConverter.Convert(options);
Handling Conversion Results
The Convert method returns a ResultContainer object that holds information about the conversion results. You can get streams of the converted PNG files as shown below:
1// Create PdfToJpegOptions object to set instructions
2var options = new PdfToPngOptions();
3// Add input File path
4options.AddInput(new FileDataSource("path_to_input.pdf"));
5// Perform the process
6var results = PdfConverter.Convert(options);
7// Get stream results
8foreach (var result in results.ResultCollection)
9{
10 var streamResultPage1 = result.ToStream();
11}
Key Features:
- Convert PDF to PNG: Quickly and efficiently convert entire PDF documents or specific pages into PNG images.
- Customizable Resolution: Set the desired DPI (e.g., 300 DPI) for high-quality image output.
- Page set: Select specific pages for conversion.
- Easy Output Management: Specify output directories for each converted PNG file.
- Quick Conversion: Fast, efficient, and requires minimal effort to configure.
PDF to TIFF
The Documentize PDF Converter for .NET is a powerful tool designed to convert PDF documents into high-quality TIFF images. This plugin ensures that your content is accessible across various platforms while maintaining excellent fidelity and versatility.
You can customize the conversion process by adjusting resolution, enabling multi-page output, or selecting pages.
How to Convert PDF to TIFF
To convert a PDF document into TIFF images, follow these steps:
- Create an instance of
PdfToTiffOptions to configure the conversion process. - Add the input PDF file using the
AddInput method. - Specify the output file path for the TIFF images using the
AddOutput method. - Run the
Convert method to convert the PDF pages into TIFF images.
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
7// Perform the process
8PdfConverter.Convert(options);
Customizing Pages and DPI of PDF to TIFF Conversion
Here’s how to convert 2 pages of a PDF at 400 DPI into a TIFF file:
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
7// Set Pages
8options.PageList = [1, 3];
9// Set result image Resolution
10options.OutputResolution = 400;
11// Perform the process
12PdfConverter.Convert(options);
Multi-Page TIFF Creation
The plugin supports multi-page TIFF generation, allowing you to combine multiple PDF pages into a single TIFF file for efficient archiving or printing.
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
7// Enable Multi-Page TIFF output
8options.MultiPage = true;
9// Perform the process
10PdfConverter.Convert(options);
Customizing Pages and DPI of PDF to TIFF Conversion
Here’s how to convert 2 pages of a PDF at 400 DPI into a TIFF file:
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
7// Set Compression and ColorDepth
8options.Compression = TiffCompression.RLE;
9options.ColorDepth = TiffColorDepth.Format24bpp;
10// Perform the process
11PdfConverter.Convert(options);
How to Handle Conversion Results
The Convert method returns a ResultContainer object that provides details about the conversion results. You can get streams of the converted TIFF files as shown below:
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input File path
4options.AddInput(new FileDataSource("path_to_input.pdf"));
5// Perform the process
6var results = PdfConverter.Convert(options);
7// Get stream results
8foreach (var result in results.ResultCollection)
9{
10 var streamResultPage1 = result.ToStream();
11}
Key Features:
- Convert PDF to TIFF: Effortlessly convert entire PDF documents or specific pages into TIFF images.
- Custom Resolution: Adjust the resolution (e.g., 300 dpi) for superior quality outputs.
- Multi-Page TIFF: Combine multiple PDF pages into a single multi-page TIFF file.
- Page set: Select specific pages for conversion.
- Quick Conversion: Fast and efficient process with minimal effort.
PDF to XLS
The Documentize PDF Converter for .NET is a versatile and powerful tool for converting PDF documents into Excel spreadsheets (XLSX/XLS/CSV/XLSM/ODS). By leveraging this plugin, developers can seamlessly transform static PDF data into dynamic and editable spreadsheets, simplifying data manipulation, analysis, and sharing.
How to Convert PDF to Excel
To convert a PDF document into an Excel file (XLSX), follow these steps:
- Configure the conversion settings using the
PdfToXlsOptions class. - Add input PDF files using the
AddInput method. - Specify the output file path using the
AddOutput method. - Execute the
Convert method to initiate the conversion.
1// Create PdfToXlsOptions object to set instructions
2var options = new PdfToXlsOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileDataSource("path_to_result_xlsx_file.xlsx"));
7// Perform the process
8PdfConverter.Convert(options);
Customizing the PDF to Excel Conversion
The PdfToXlsOptions class allows you to customize the conversion process. For example, to convert the PDF to an XLS file and enable advanced formatting options:
1// Create PdfToXlsOptions object to set instructions
2var options = new PdfToXlsOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Specify XLS format
6options.Format = PdfToXlsOptions.ExcelFormat.XMLSpreadSheet2003;
7options.InsertBlankColumnAtFirst = true;
8options.MinimizeTheNumberOfWorksheets = true;
9// Set output file path
10options.AddOutput(new FileDataSource("path_to_result_xlsx_file.xls"));
11// Perform the process
12PdfConverter.Convert(options);
The PdfToXlsOptions.ExcelFormat enum provides a range of output formats:
- XLSX: Office Open XML (.xlsx) File Format (default).
- XLSM: Macro-enabled Excel format.
- CSV: Comma-separated values.
- ODS: Open Document Spreadsheet.
- XMLSpreadSheet2003: Excel 2003 XML (.xls) File Format.
Key Features:
- Flexible Conversion Options: Convert PDF files into XLSX, XLS, CSV, or other formats.
- Content Preservation: Maintain the original structure, layout, and formatting.
- Advanced Formatting: Insert blank columns or minimize the number of worksheets.