PDFluent 1.0.0
dotnet add package PDFluent --version 1.0.0
NuGet\Install-Package PDFluent -Version 1.0.0
<PackageReference Include="PDFluent" Version="1.0.0" />
<PackageVersion Include="PDFluent" Version="1.0.0" />
<PackageReference Include="PDFluent" />
paket add PDFluent --version 1.0.0
#r "nuget: PDFluent, 1.0.0"
#:package PDFluent@1.0.0
#addin nuget:?package=PDFluent&version=1.0.0
#tool nuget:?package=PDFluent&version=1.0.0
PDFluent for .NET
Source on GitHub · Documentation · Report an issue
C# bindings for the PDFluent PDF engine via P/Invoke over the C API.
Requirements
- .NET targeting: the assembly targets
netstandard2.1. Consumer frameworks must be netstandard2.1-compatible: .NET Core 3.0+, .NET 5/6/7/8/9/10, Mono 6.4+, Xamarin.iOS 12.16+, Xamarin.Android 10.0+, Unity 2021.2+. Earlier .NET Framework versions (4.7.x) are no longer supported on the SDK side. - The native library (
libpdf_capi.dylib/libpdf_capi.so/pdf_capi.dll)
Building the Native Library
cargo build -p pdf-capi --release
Quick Start
using PDFluent;
// Open a PDF
using var doc = PdfDocument.Open("input.pdf");
Console.WriteLine($"Pages: {doc.PageCount}");
// Get page dimensions
double width = doc.GetPageWidth(0);
double height = doc.GetPageHeight(0);
// Extract text
string text = doc.ExtractText(0);
// Render page at 150 DPI
RenderedImage img = doc.RenderPage(0, 150.0);
Console.WriteLine($"Image: {img.Width}x{img.Height}");
// Render thumbnail
RenderedImage thumb = doc.RenderThumbnail(0, 200);
// Read metadata
string? title = doc.GetMetadata("Title");
// Get page boxes
PageBox mediaBox = doc.GetMediaBox(0);
Console.WriteLine($"MediaBox: {mediaBox.Width}x{mediaBox.Height}");
Async Support
// Open asynchronously
using var doc = await PdfDocument.OpenAsync("large.pdf");
// Extract text asynchronously
string text = await doc.ExtractTextAsync(0);
// Render asynchronously
RenderedImage img = await doc.RenderPageAsync(0, 150.0);
Password-Protected PDFs
using var doc = PdfDocument.Open("encrypted.pdf", password: "secret");
Open from Bytes
byte[] data = File.ReadAllBytes("input.pdf");
using var doc = PdfDocument.Open(data);
Error Handling
try
{
using var doc = PdfDocument.Open(invalidBytes);
}
catch (PdfException ex)
{
Console.WriteLine($"Status: {ex.Status}");
Console.WriteLine($"Message: {ex.Message}");
}
NuGet Package
The project generates a NuGet package with native library bundling per platform:
runtimes/win-x64/native/pdf_capi.dllruntimes/linux-x64/native/libpdf_capi.soruntimes/osx-arm64/native/libpdf_capi.dylib
API Reference
| Member | Description |
|---|---|
PdfDocument.Open(string, string?) |
Open from file path |
PdfDocument.Open(byte[]) |
Open from bytes |
PdfDocument.OpenAsync(string, string?) |
Open asynchronously |
PageCount |
Number of pages |
BookmarkCount |
Number of bookmarks |
GetPageWidth(int) |
Page width in points |
GetPageHeight(int) |
Page height in points |
GetPageRotation(int) |
Page rotation degrees |
GetMediaBox(int) |
Page media box |
GetCropBox(int) |
Page crop box |
ExtractText(int) |
Extract text from page |
ExtractTextAsync(int) |
Extract text (async) |
RenderPage(int, double) |
Render at DPI |
RenderPageAsync(int, double) |
Render (async) |
RenderThumbnail(int, int) |
Render thumbnail |
GetMetadata(string) |
Get metadata value |
Dispose() |
Free native resources |
Licence
AGPL-3.0 or a commercial licence, at your option. The AGPL is the default and
the complete product: there is no licence key, no activation call and no tier,
and every feature works in every build. If you cannot accept the copyleft
obligation, the commercial licence is sold yearly and self-service at
pdfluent.com/sdk/pricing, in four options: Commercial (per
organisation), OEM Startup and OEM (per product), and Priority support (an
add-on). The two texts are LICENSE and LICENSE-COMMERCIAL in this package.
Links
- Documentation: https://pdfluent.com/docs
- Pricing: https://pdfluent.com/sdk/pricing
- PDFluent editor (source-available): https://github.com/pdfluent/pdfluent. The free desktop app this SDK powers.
- Built by Innovation Trigger BV
| 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 119 | 9/16/2026 |
| 1.0.0-beta.17.3 | 89 | 7/15/2026 |
| 1.0.0-beta.17.2 | 87 | 7/15/2026 |
| 1.0.0-beta.17.1 | 82 | 7/15/2026 |
| 1.0.0-beta.17 | 96 | 6/19/2026 |
| 1.0.0-beta.10 | 80 | 6/3/2026 |
| 1.0.0-beta.8 | 86 | 5/30/2026 |
| 1.0.0-beta.6 | 93 | 5/15/2026 |
| 1.0.0-beta.5 | 87 | 5/14/2026 |