Documentize 25.10.0
dotnet add package Documentize --version 25.10.0
NuGet\Install-Package Documentize -Version 25.10.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Documentize" Version="25.10.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Documentize" Version="25.10.0" />
<PackageReference Include="Documentize" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Documentize --version 25.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Documentize, 25.10.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Documentize@25.10.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Documentize&version=25.10.0
#tool nuget:?package=Documentize&version=25.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
.NET API to Process & Manipulate PDF Files
Documentize is a powerful .NET library that simplifies PDF manipulation tasks. Whether you're merging, splitting, extracting content, or securing PDF documents, Documentize offers a wide range of features to enhance productivity. With support for multiple platforms, including Windows, macOS, and Linux, it is a reliable choice for developers.
Key Features
PDF Manager
- Merge and Split PDF documents.
- Rotate, Resize pages of PDF documents.
- Compress PDF files by optimizing images and removing unused objects.
- Optimize PDF files (also known as applying a Fast Web View. This process allows web browsers and PDF viewers to display the first page of the document almost immediately while the rest of the file downloads in the background, creating a much faster and better user experience for large online documents.).
- Add a Table to a PDF document.
- Add a Table of Contents to PDF document.
PDF Extractor
- Extract Text from PDF documents.
- Extract Images from PDF documents.
- Extract Form Data from PDF documents.
Conversion
- Convert PDF documents to various formats like Word (DOC,DOCX), Excel (XLSX,CSV,ODS), Images (PNG, JPEG, TIFF), and HTML.
- Create and Validate PDF/A-compliant files for long-term archiving.
PDF Security
- Encrypt or Decrypt PDF documents.
- Digitally sign and validate signatures on PDFs.
PDF Forms Handling
- Create, fill, and flatten interactive forms.
- Export form data to DSV (CSV) or JSON formats.
Examples
Merge PDF files
var options = new MergeOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file_1.pdf"));
options.AddInput(new FileDataSource("path_to_your_pdf_file_2.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
PdfManager.Merge(options);
Split PDF
var options = new SplitOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file_1.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file_2.pdf"));
PdfManager.Split(options);
Optimize PDF
var options = new OptimizeOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
PdfManager.Optimize(options);
Rotate PDF
var options = new RotateOptions();
options.Rotation = Rotation.On90;
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
PdfManager.Rotate(options);
Resize PDF
var options = new ResizeOptions();
options.PageSize = PageSize.A3;
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
PdfManager.Resize(options);
Compress PDF
var options = new CompressOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
PdfManager.Compress(options);
Add Table of Contents to PDF
var options = new TocOptions();
options.Title = "My Table of Contents";
options.GenerateBookmarks = true;
options.Headings.Add(new TocHeading("Introduction", 2, false, 1));
options.Headings.Add(new TocHeading("Chapter I", 3, true, 1));
options.Headings.Add(new TocHeading("Chapter II", 4, true, 1));
options.Headings.Add(new TocHeading("Example A", 4, true, 2));
options.Headings.Add(new TocHeading("Example B", 4, true, 2));
options.Headings.Add(new TocHeading("Example C", 4, true, 2));
options.Headings.Add(new TocHeading("Example D", 4, true, 2));
options.Headings.Add(new TocHeading("Chapter III", 5, true, 1));
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
PdfManager.AddTableOfContents(options);
Extract Text from PDF
var options = new ExtractTextOptions(TextFormattingMode.Pure);
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
var results = PdfExtractor.ExtractText(options);
var textExtracted = results.ResultCollection[0].ToString();
Extract Images from PDF
var options = new ExtractImagesOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new DirectoryDataSource("path_to_results_directory"));
var results = PdfExtractor.ExtractImages(options);
Export Form values to CSV file
var options = new ExtractFormDataToDsvOptions(',', true);
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_csv_file.csv"));
PdfExtractor.ExtractFormData(options);
Encrypt PDF
var options = new EncryptionOptions("123456", "qwerty");
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
Security.Process(options);
Decrypt PDF
var options = new DecryptionOptions("123456");
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
Security.Process(options);
Digitally Sign a PDF
var options = new SignOptions(dataDir + "cert.pfx", "password");
options.AddInput(new FileDataSource(dataDir + "sample.pdf"));
options.AddOutput(new FileDataSource(dataDir + "result.pdf"));
Signature.Process(options);
Convert PDF to PDF/A (PDF/A-3b in this case)
var options = new PdfAConvertOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_the_converted_file.pdf"));
options.PdfAVersion = PdfAStandardVersion.PDF_A_3B;
PdfAConverter.Process(options);
Convert PDF to Word (.doc)
var options = new PdfToDocOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_file.doc"));
DocConverter.Process(options);
Convert PDF to Excel (.xlsx)
var options = new PdfToXlsOptions();
options.Format = PdfToXlsOptions.ExcelFormat.XLSX;
options.AddInput(new FileDataSource(dataDir + "sample.pdf"));
options.AddOutput(new FileDataSource(dataDir + "result.xlsx"));
XlsConverter.Process(options);
Convert PDF to HTML (.html)
var options = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
options.AddInput(new FileDataSource("path_to_input.pdf"));
options.AddOutput(new FileDataSource("path_to_output.html"));
HtmlConverter.Process(options);
Convert PDF to Png (.png)
var options = new PdfToPngOptions();
options.AddInput(new FileDataSource(dataDir + "sample.pdf"));
options.AddOutput(new DirectoryDataSource(dataDir + "results"));
PngConverter.Process(options);
Convert PDF to JPEG (.jpeg)
var options = new PdfToJpegOptions();
options.AddInput(new FileDataSource(dataDir + "sample.pdf"));
options.AddOutput(new DirectoryDataSource(dataDir + "results"));
JpegConverter.Process(options);
Convert PDF to TIFF (.tiff)
var options = new PdfToTiffOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
TiffConverter.Process(options);
Flatten fields in PDF file
var options = new FormFlattenerOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
options.SkipFields.Add("Surname");
FormFlattener.Process(options);
For more examples, visit our GitHub Examples page.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyModel (>= 2.0.4)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Diagnostics.DiagnosticSource (>= 7.0.0)
- System.Diagnostics.PerformanceCounter (>= 4.5.0)
- System.Drawing.Common (>= 5.0.3)
- System.Net.Http.Json (>= 8.0.1)
- System.Reflection.Emit (>= 4.7.0)
- System.Security.Cryptography.Pkcs (>= 4.7.0)
- System.Security.Permissions (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 7.0.0)
- System.Text.Json (>= 8.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.