PDF/A is a family of ISO standards that define a subset of the PDF format suitable for long-term archiving. The key requirement is self-containment: everything needed to reproduce the document identically — fonts, color profiles, metadata — must be embedded inside the file. External references, encryption, and certain interactive features are forbidden. pdfmake supports all major PDF/A conformance levels through a handful of document-definition properties.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bpampuch/pdfmake/llms.txt
Use this file to discover all available pages before exploring further.
Why PDF/A Matters
Government agencies, legal firms, libraries, and any organisation with document-retention requirements often mandate PDF/A. Submitting a standard PDF to such systems may fail validation checks or be rejected outright. When pdfmake produces a PDF/A document, it embeds the required XMP metadata stream, declares the conformance level, and ensures fonts are fully embedded — satisfying the core archival requirements.Supported Conformance Levels
pdfmake supports the followingsubset values:
| Value | Standard | Accessibility |
|---|---|---|
'PDF/A-1' | ISO 19005-1 | — |
'PDF/A-1a' | ISO 19005-1 | Tagged (accessible) |
'PDF/A-1b' | ISO 19005-1 | Basic |
'PDF/A-2' | ISO 19005-2 | — |
'PDF/A-2a' | ISO 19005-2 | Tagged (accessible) |
'PDF/A-2b' | ISO 19005-2 | Basic |
'PDF/A-3' | ISO 19005-3 | — |
'PDF/A-3a' | ISO 19005-3 | Tagged (accessible) |
'PDF/A-3b' | ISO 19005-3 | Basic |
'PDF/UA' | ISO 14289-1 | Tagged (universal accessibility) |
'a' conformance levels require the document to be tagged (accessible), while 'b' levels only require correct visual reproduction.
Minimal PDF/A Document
Setting thesubset property in your document definition is the primary switch. You should also set the version to match the underlying PDF version required by the chosen standard, and provide info.title (required for valid XMP metadata).
examples/pdfa.js in the pdfmake source.
Document Metadata (info)
The info property populates the PDF document information dictionary and the XMP metadata stream. Valid XMP metadata is mandatory for PDF/A compliance. Provide as much information as is applicable:
The document title. Required for PDF/A compliance and displayed in the viewer when
displayTitle: true.The name of the document author.
A brief description of the document subject.
A space- or comma-separated list of keywords.
The name of the application that created the original content (as opposed to the PDF converter).
Font Embedding Requirements
PDF/A mandates that all fonts are fully embedded in the file. pdfmake embeds fonts by default, so as long as you use fonts that are registered in the VFS, this requirement is satisfied automatically. If you are using the default Roboto font frompdfmake/build/vfs_fonts, font embedding is handled for you. For custom fonts, follow the Fonts guide to ensure they are loaded into the VFS before calling createPdf.
Tagged PDF
Thetagged: true property marks the document as a Tagged PDF, which adds logical structure (tags) to the content so that screen readers and other assistive technology can navigate it. This is required for the 'a' conformance levels (PDF/A-1a, PDF/A-2a, PDF/A-3a) and for PDF/UA.
File Attachments (PDF/A-3)
PDF/A-3 is unique in that it allows arbitrary file attachments to be embedded in the archive package. This is used, for example, to embed a machine-readable XML invoice alongside the human-readable PDF — a common requirement in electronic invoicing standards (ZUGFeRD, Factur-X). Attachments are defined in the top-levelattachments dictionary and referenced by name from inline attachment nodes in the content:
attachments dictionary) by providing an object directly:
File attachments are only permitted in PDF/A-3. Using the
attachments key with subset: 'PDF/A-1' or subset: 'PDF/A-2' will produce a non-conformant document.displayTitle
When displayTitle: true is set, PDF viewers show the document’s info.title in the window title bar instead of the filename. This is good practice for archival documents where the filename may change over time.
Known Limitations and Gotchas
No encryption
PDF/A documents must not be encrypted. Setting
userPassword or ownerPassword together with subset will produce a non-conformant file. The archival standard requires that the file can always be opened without a password.No standard fonts
Helvetica, Times-Roman, Courier, and other 14 standard PDF fonts are not embedded. Using them in a PDF/A document violates the self-containment requirement. Use VFS-registered fonts only.
ICC profile dependency
A valid PDF/A document must declare an output intent with an embedded ICC color profile. pdfmake handles this internally, but if you are post-processing the PDF with external tools, ensure they preserve the output intent.
External references forbidden
Any content that references an external URL (remote images, remote fonts) is not permitted in PDF/A. All resources must be embedded. Use data URLs or local files for images, and register fonts via the VFS.