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, and a single offline license unlocks the corporate features. 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: a commercial per-application license, never the AGPL of iText or the per-server billing of Aspose.
  • Free to build with: everyday PDF generation is free forever; you only license the regulated-grade features.

Free to build with. Licensed when you ship.

Prototype and generate everyday PDFs for free. When you need archival, signatures, encryption or accessibility, one license unlocks them all in Delphi and every other binding.

Community free

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

Corporate licensed

  • 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

Try every licensed feature free for 5 days.

Get a trial token by email and unlock PDF/A, digital signatures, encryption and accessibility in Delphi. No account, no card required.

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

Add RustPdf.pas to your search path and ship your first archival PDF today. Free for everyday generation; license the corporate features when you go to production.

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.