Enterprise PDF for Delphi & Free Pascal

The enterprise PDF library
Delphi doesn't have.

Generate archival PDF/A, sign documents with PAdES, encrypt with AES-256 and produce accessible PDF/UA from Delphi or Free Pascal. One memory-safe core, the same behavior as every other binding, running entirely on your servers: no per-document SaaS fees, no data leaving your network, no AGPL strings.

A single source unit, RustPdf.pas. No headers, no native build step.
uses RustPdf;   // download from rustpdf.dev/docs/delphi, add to your search path
Validated by independent tools: veraPDFpdfsigopenssl cmsqpdfmutool

Why Delphi teams pick rust-pdf

Delphi and Free Pascal keep long-lived line-of-business and desktop apps running for decades, often in regulated sectors that now demand PDF/A archival, qualified signatures, AES-256 and PDF/UA. Native options are scarce and mostly commercial, with no modern PAdES or PDF/A path.

rust-pdf is a single source unit, RustPdf.pas, that loads the shared library at run time. It compiles under Delphi 10.x+ and FPC 3.2+, needs no native build step, with every feature free. Deployment means dropping the library beside your app.

  • One source unit: no headers, no JNI, no native build on your machines.
  • Delphi and FPC: the same unit compiles on both, Windows / Linux / macOS.
  • Runs on your servers: documents never leave your network and nothing phones home, ideal for LGPD/GDPR, fintech and health.
  • No AGPL trap: MIT licensed, never the AGPL of iText or the per-server billing of Aspose.
  • Free to build with: every feature is free forever.

Every feature is free.

Prototype and ship everyday PDFs for free. PDF/A, signatures, encryption and accessibility are all included in Delphi and every other binding.

Core free

  • Pages & vector graphics
  • Embedded/subset fonts, Unicode shaping
  • Justified paragraphs & tables
  • Images (JPEG/PNG/alpha/16-bit)
  • Merge / split / rotate
  • Text extraction & optimize

Advanced free

  • PDF/A: 1b / 2b / 2a / 3b / 3a / 4 / 4e / 4f archival
  • Digital signatures: PKCS#7, visible & multiple
  • PAdES: B-B / B-LT / B-LTA + RFC 3161 timestamps
  • Encryption: RC4 / AES-128 / AES-256 (R6)
  • Accessibility: Tagged PDF / PDF/UA-1
  • AcroForm: fields with generated appearances
  • Validate & convert: verify signatures, PDF→PDF/A, ZUGFeRD/Factur-X
  • Process: redaction, image extraction, form fill/flatten, page→PNG

Every feature is free.

rust-pdf is MIT licensed — PDF/A, digital signatures, encryption, accessibility and page rendering are all included. No key, no account, no card.

Author a tagged PDF/A in a few lines of Object Pascal

// add RustPdf.pas to your unit search path (rustpdf.dev/docs/delphi)
Doc := TPdfDocument.Create;
try
  Doc.Pdfa(palA2A).Tagged.SetInfo('Q3 Report', '', '', '', '');
  F := Doc.AddFontFile('Roboto-Regular.ttf');
  Doc.AddPage.ShowText(F, 26, 72, 760, 'Annual report', 1);   // heading level 1 = H1
  Bytes := Doc.ToBytes;            // archival-grade, accessible PDF
finally
  Doc.Free;
end;

The full Delphi / Free Pascal reference (fonts, images, forms, manipulation, encryption and signatures) lives in the Delphi docs.

VCL, FMX desktop and Windows services

ToBytes returns a TBytes, so a VCL or FireMonkey app can write it to disk, push it into a TMemoryStream for a preview control, or hand it to a print or email routine. The same unit runs inside a Windows service or a console batch job that stamps PDF/A archives overnight.

RustPdf.pas is one source unit that loads the shared library at run time, with no headers and no native build on your machines. It compiles on Delphi 10.x+ and FPC 3.2+ across Windows, Linux and macOS. Deployment means dropping the library beside your executable; the resolver also checks the app directory and the current folder.

// VCL: build a PDF/A and save it
Doc := TPdfDocument.Create;
try
  Doc.Pdfa(palA2B);
  F := Doc.AddFontFile('Roboto-Regular.ttf');
  Doc.AddPage.ShowText(F, 18, 72, 760, 'Invoice #1024', 0);
  TFile.WriteAllBytes('invoice.pdf', Doc.ToBytes);
finally
  Doc.Free;
end;

Where to go next in Delphi

The Delphi and Free Pascal reference covers the full API, and the concept hubs explain each standard, with the same behavior as every other binding.

Start building in Delphi

One Rust core, the same output in every language — free and MIT licensed.

Delphi PDF library FAQ

Does the same unit work on Delphi and Free Pascal?

Yes. RustPdf.pas compiles under both Delphi 10.x+ and FPC 3.2+ using {$IFDEF FPC}{$MODE DELPHI}{$ENDIF}, on Windows, Linux and macOS. There is no separate FPC fork to maintain.

How do I deploy the native library?

Drop the shared library next to your executable. The unit loads it at run time and the resolver checks the executable's own directory and the current folder, as well as the usual locations, so there is nothing to register and no installer step.

Can I generate PDFs from multiple threads?

Yes. Give each thread its own TPdfDocument or TPdfEditable; independent documents share no state. On FPC/Unix, include cthreads early in your program so the threading runtime is active.