Enterprise PDF for Swift · iOS & macOS

The enterprise PDF library
Swift doesn't have.

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

Add via SwiftPM. Links a static xcframework, so it works inside an iOS app bundle.
.package(url: "…/rustpdf-swift", from: "0.1.0")
Validated by independent tools: veraPDFpdfsigopenssl cmsqpdfmutool

Why Swift teams pick rust-pdf

Apple's PDFKit renders and annotates, but it does not produce PDF/A, qualified PAdES signatures or PDF/UA, the things regulated iOS and macOS apps actually need for contracts, statements and e-invoices. The fallback is a per-document cloud service, which means shipping user documents off the device.

rust-pdf links a static xcframework through SwiftPM, so it works inside an iOS app bundle with nothing to dlopen. The same core runs in server-side Swift, and a single offline license unlocks the corporate features.

  • On-device, fully offline: documents never leave the device, perfect for privacy-sensitive apps.
  • iOS & macOS: a static xcframework links into an app bundle, no sidecar library to ship.
  • Standards-grade: real PDF/A, PAdES and PDF/UA, beyond what PDFKit can do.
  • 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 Swift 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 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

Author a tagged PDF/A in a few lines of Swift

// SwiftPM: .package(url: "…/rustpdf-swift", from: "0.1.0")
import RustPdf

let doc = try Document()
try doc.pdfa(.a2a).tagged().setInfo(DocumentInfo(title: "Q3 Report"))
let f = try doc.addFont(path: "Roboto-Regular.ttf")
try doc.addPage()
try doc.showText(font: f, size: 26, x: 72, y: 760, "Annual report", headingLevel: 1)
let bytes = try doc.toBytes()      // archival-grade PDF, links on macOS & iOS

The full Swift reference (fonts, images, forms, manipulation, encryption and signatures) lives in the Swift docs.

Start building in Swift

Add the SwiftPM package and ship your first archival PDF today, on iOS or macOS. Free for everyday generation; license the corporate features when you go to production.