![]() |
VOOZH | about |
dotnet add package Unpdf --version 0.7.0
NuGet\Install-Package Unpdf -Version 0.7.0
<PackageReference Include="Unpdf" Version="0.7.0" />
<PackageVersion Include="Unpdf" Version="0.7.0" />Directory.Packages.props
<PackageReference Include="Unpdf" />Project file
paket add Unpdf --version 0.7.0
#r "nuget: Unpdf, 0.7.0"
#:package Unpdf@0.7.0
#addin nuget:?package=Unpdf&version=0.7.0Install as a Cake Addin
#tool nuget:?package=Unpdf&version=0.7.0Install as a Cake Tool
.NET bindings for unpdf - High-performance PDF content extraction to Markdown, text, and JSON.
dotnet add package Unpdf
using Unpdf;
// Convert PDF to Markdown
string markdown = Pdf.ToMarkdown("document.pdf");
Console.WriteLine(markdown);
// Convert PDF to plain text
string text = Pdf.ToText("document.pdf");
Console.WriteLine(text);
// Convert PDF to JSON
string json = Pdf.ToJson("document.pdf", pretty: true);
Console.WriteLine(json);
// Get document information
var info = Pdf.GetInfo("document.pdf");
Console.WriteLine($"Title: {info.Title}");
Console.WriteLine($"Pages: {info.PageCount}");
// Get page count
int pages = Pdf.GetPageCount("document.pdf");
Console.WriteLine($"Total pages: {pages}");
// Check if file is a valid PDF
bool isValid = Pdf.IsPdf("document.pdf");
Console.WriteLine($"Is valid PDF: {isValid}");
using Unpdf;
// Convert with frontmatter and image extraction
var options = new PdfOptions
{
IncludeFrontmatter = true,
ExtractImages = true,
ImageOutputDir = "./images",
Lenient = true
};
string markdown = Pdf.ToMarkdown("document.pdf", options);
Console.WriteLine(markdown);
using Unpdf;
// Extract all images from PDF
var images = Pdf.ExtractImages("document.pdf", "./output/images");
foreach (var image in images)
{
Console.WriteLine($"Image: {image.Filename}");
Console.WriteLine($" Path: {image.Path}");
Console.WriteLine($" Type: {image.MimeType}");
Console.WriteLine($" Size: {image.Width}x{image.Height}");
Console.WriteLine($" Bytes: {image.SizeBytes}");
}
Pdf.ToMarkdown(string path)Convert a PDF file to Markdown format.
Pdf.ToMarkdown(string path, PdfOptions options)Convert a PDF file to Markdown format with options.
Pdf.ToText(string path)Convert a PDF file to plain text.
Pdf.ToJson(string path, bool pretty = false)Convert a PDF file to JSON format.
Pdf.GetInfo(string path)Get document metadata (title, author, page count, etc.)
Pdf.GetPageCount(string path)Get the number of pages in a PDF file.
Pdf.IsPdf(string path)Check if a file is a valid PDF.
Pdf.ExtractImages(string path, string outputDir)Extract all images from a PDF file to the specified directory.
Pdf.VersionGet the version of the native library.
| Property | Type | Default | Description |
|---|---|---|---|
ExtractImages |
bool |
false |
Enable image extraction during conversion |
ImageOutputDir |
string? |
null |
Directory to save extracted images |
IncludeFrontmatter |
bool |
false |
Include YAML frontmatter with metadata |
Lenient |
bool |
true |
Continue parsing despite minor errors |
MIT License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Unpdf:
| Package | Downloads |
|---|---|
|
FileFlux
Complete document processing SDK optimized for RAG systems. Transform PDF, DOCX, Excel, PowerPoint, Markdown and other formats into high-quality chunks with intelligent semantic boundary detection. Includes advanced chunking strategies, metadata extraction, and performance optimization. |
|
|
FileFlux.Core
Pure document extraction SDK for RAG systems. Zero AI dependencies. Extract text from PDF, DOCX, Excel, PowerPoint, Markdown, HTML, and text files. Provides IDocumentReader interface and implementations. Use FileFlux.Core for extraction-only scenarios. For AI-enhanced extraction (image OCR, captioning), use the FileFlux package. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.0 | 102 | 5/31/2026 |
| 0.6.4 | 340 | 5/20/2026 |
| 0.6.3 | 105 | 5/12/2026 |
| 0.6.2 | 103 | 5/9/2026 |
| 0.6.1 | 109 | 5/9/2026 |
| 0.6.0 | 109 | 5/9/2026 |
| 0.5.0 | 107 | 5/9/2026 |
| 0.4.6 | 108 | 5/1/2026 |
| 0.4.5 | 124 | 4/15/2026 |
| 0.4.4 | 110 | 4/15/2026 |
| 0.4.3 | 112 | 4/14/2026 |
| 0.4.2 | 105 | 4/14/2026 |
| 0.4.1 | 120 | 4/14/2026 |
| 0.4.0 | 108 | 4/14/2026 |
| 0.2.4 | 2,766 | 3/10/2026 |
| 0.2.3 | 122 | 3/3/2026 |
| 0.2.1 | 775 | 2/21/2026 |
| 0.1.10 | 120 | 2/19/2026 |
| 0.1.9 | 118 | 2/18/2026 |
| 0.1.8 | 112 | 2/18/2026 |