Aelena.FileApi.Core.Pdf 0.3.1

dotnet add package Aelena.FileApi.Core.Pdf --version 0.3.1
                    
NuGet\Install-Package Aelena.FileApi.Core.Pdf -Version 0.3.1
                    
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="Aelena.FileApi.Core.Pdf" Version="0.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aelena.FileApi.Core.Pdf" Version="0.3.1" />
                    
Directory.Packages.props
<PackageReference Include="Aelena.FileApi.Core.Pdf" />
                    
Project file
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 Aelena.FileApi.Core.Pdf --version 0.3.1
                    
#r "nuget: Aelena.FileApi.Core.Pdf, 0.3.1"
                    
#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 Aelena.FileApi.Core.Pdf@0.3.1
                    
#: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=Aelena.FileApi.Core.Pdf&version=0.3.1
                    
Install as a Cake Addin
#tool nuget:?package=Aelena.FileApi.Core.Pdf&version=0.3.1
                    
Install as a Cake Tool

Aelena.FileApi.Core.Pdf

PDF operations for Aelena.FileApi.Core, built on iText 7.

πŸ“– Full documentation is in the repository README; the licence position is explained in full in LICENSING.md.


⚠️ Read this before installing: this package is AGPL-3.0-or-later

It depends on iText 7, licensed under the GNU Affero General Public License v3 or, at your option, under a commercial licence sold by iText Software.

The AGPL is a strong copyleft licence, and unlike the GPL its obligation is triggered by running the software as a network service, not only by distributing it. If you use this package in a web application or an API, the obligation reaches your application's source.

Your options:

If you… Then…
Are building open source under a compatible licence Use this package freely
Hold a commercial iText licence Use this package; iText's terms govern, not the AGPL
Cannot accept the AGPL Do not install this package β€” use Aelena.FileApi.Core, which is MIT

Installing this package does not grant you a commercial iText licence. That is an agreement between you and iText Software.

Everything except PDF is MIT. Aelena.FileApi.Core gives you DOCX, images, email, hashing, PII detection, readability, text analysis and ZIP β€” with no reference to iText, direct or transitive. PDF was split into this separate package precisely so the rest could stay permissive.

Install

dotnet add package Aelena.FileApi.Core.Pdf

Targets net10.0 and net11.0. Brings in Aelena.FileApi.Core.

What it does

Read β€” metrics (pages, words, tokens, images, OCR need, signatures, corruption), metadata, text extraction by page range, Markdown conversion, annotations, bookmarks, form fields, search with page numbers, health check.

Write β€” merge, split, rotate, reorder, delete pages, insert blank pages, watermark, page numbers, encrypt, decrypt, unlock, compress, remove metadata.

using Aelena.FileApi.Core.Services.Pdf;

var bytes = await File.ReadAllBytesAsync("report.pdf");

var metrics = PdfService.GetMetrics(bytes, "report.pdf");
Console.WriteLine($"{metrics.PageCount} pages, OCR needed: {metrics.OcrNeeded}");

var text = PdfService.ExtractText(bytes, "report.pdf", pages: "1,3,5-8");
foreach (var page in text.Pages)
    Console.WriteLine($"--- Page {page.Page} ---\n{page.Text}");

An unreadable or password-protected file raises FileApiException with a message saying what is actually wrong, rather than surfacing an iText exception. GetMetrics is the deliberate exception: it answers for a broken document with IsCorrupt = true, because asking whether a file is usable is its job.

The three packages

Package Licence Depends on Contains
Aelena.FileApi.Core MIT β€” Everything except PDF
Aelena.FileApi.Core.Pdf AGPL-3.0-or-later Core, iText 7 PDF only
Aelena.FileApi.Cli AGPL-3.0-or-later bundled, not declared Both, as a dotnet tool
Aelena.FileApi.Core          MIT, no iText anywhere in its graph
        β–²
        β”‚ depends on
        β”‚
Aelena.FileApi.Core.Pdf      AGPL β€” adds iText 7, and only this package does

Core.Pdf depends on Core, never the reverse: installing the PDF package gives you the whole toolkit, while installing Core alone keeps every copyleft dependency out of your build. The CLI is a tool package, so it bundles its dependencies rather than declaring them β€” its empty dependency list does not mean iText is absent from it.

Not implemented

ExtractTables and RedactText throw FileApiException with status 501.

Both previously returned a plausible-looking success: table extraction always reported zero tables, and redaction returned the document unmodified with a non-zero redaction count, so text the caller asked to remove was still fully extractable. Refusing is safer than a wrong answer that looks right. See the changelog.

More

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.3.1 38 9/1/2026
0.3.0 41 9/1/2026