PDF/A is an ISO-standardized version of PDF designed for long-term archiving and preservation of electronic documents.
Unlike regular PDFs, PDF/A ensures that a document can be opened and rendered consistently many years in the future, regardless of software, operating systems, or hardware changes.
Why PDF/A Restricts Attachments
The purpose of PDF/A is:
- Self-contained documents
- Long-term readability
- No external dependencies
If a PDF depends on external files, future users may not have access to them.
For this reason, attachment support differs between PDF/A versions.
PDF/A-1 and Attachments
PDF/A-1a
ISO 19005-1
Attachments Allowed?
❌ No
Embedded Files Allowed?
❌ No
PDF/A-1 completely prohibits:
/EmbeddedFiles
Example invalid structure:
<<
/Type /Catalog
/Names <<
/EmbeddedFiles ...
>>
>>
Validation result:
PDF/A-1 Compliance Error:
Embedded files are forbidden.
Reason:
An embedded file may not be preservable.
PDF/A-1b
Same restriction.
Attachments are forbidden.
PDF/A-2 and Attachments
ISO 19005-2
Introduced:
- JPEG2000
- Layers
- Transparency
Are Attachments Allowed?
Partially.
PDF/A-2 permits embedding only PDF/A-compliant documents.
Example:
Main.pdf
└── Attached:
ArchivedInvoice.pdf
If:
ArchivedInvoice.pdf
is also PDF/A-compliant, validation succeeds.
If attached file is:
invoice.xlsx
validation fails.
Rules
Allowed:
PDF/A
PDF/A-1
PDF/A-2
Not allowed:
DOCX
XLSX
ZIP
XML
JPG
PNG
EXE
PDF/A-3 and Attachments
ISO 19005-3
This is the most important version regarding attachments.
Major Change
PDF/A-3 allows embedding ANY file type.
Examples:
invoice.xml
invoice.xlsx
invoice.docx
invoice.csv
invoice.zip
invoice.jpg
all allowed.
Why Was PDF/A-3 Created?
Mainly for electronic invoicing.
Examples:
Germany
FeRD ZUGFeRD
PDF contains:
Visual invoice (PDF)
+
Invoice XML
Europe
Factur-X
Contains:
PDF/A-3
+
XML invoice
Associated Files (AF)
PDF/A-3 introduced:
/AF
Associated Files.
Example:
Catalog
|
+-- AF
|
+-- invoice.xml
This identifies files related to the document.
AFRelationship
Every attachment should specify its relationship.
Example:
/AFRelationship /Data
Possible values:
| Value | Meaning |
|---|---|
| Source | Original source document |
| Data | Data represented by PDF |
| Alternative | Alternative representation |
| Supplement | Supplemental information |
| Unspecified | Unknown relationship |
Example: XML Invoice
invoice.pdf
contains:
invoice.xml
Attachment metadata:
/AFRelationship /Data
Meaning:
XML contains invoice data represented by PDF.
PDF/A-4 and Attachments
ISO 19005-4
Based on PDF 2.0.
Introduces 3 variants:
PDF/A-4
PDF/A-4 permits embedding any file type. Each embedded file should have an Associated File Relationship (AFRelationship) entry.
Common values include:
| AFRelationship | Meaning |
|---|---|
| Source | Original source document |
| Data | Data used to create the PDF |
| Alternative | Alternative representation |
| Supplement | Supplemental information |
| EncryptedPayload | Encrypted attachment |
| Unspecified | Relationship not specified |
Example:
AFRelationship = Data
for an XML data file attached to an invoice PDF.
PDF/A-4e
PDF/A-4e (Engineering conformance level of PDF/A-4) is designed for long-term archiving of engineering and technical documents, especially those containing 3D models and CAD-related content. It is based on PDF 2.0 and is defined in ISO 19005-4 Annex B.
Are attachments allowed?
Yes. Unlike PDF/A-1, PDF/A-4e permits embedded files (attachments). In fact, PDF/A-4 generally allows embedded files and associated files.
What file types can be attached?
Examples include:
-
CAD files (
.step,.stp,.iges,.igs) -
3D model files (
.u3d,.prc,.gltf) - XML files
- CSV files
-
Excel spreadsheets (
.xlsx) -
Word documents (
.docx) -
Images (
.jpg,.png,.tif) - Source code files
- Any proprietary engineering format
PDF/A-4f
The "f" means:
f = file attachments
Purpose:
Archive PDFs with embedded files.
Attachments fully supported.
Technical Structure of Attachments
Example object:
10 0 obj
<<
/Type /Filespec
/F (invoice.xml)
/EF <<
/F 11 0 R
>>
>>
endobj
Embedded file stream:
11 0 obj
<<
/Type /EmbeddedFile
>>
stream
...
endstream
endobj
Catalog:
<<
/AF [10 0 R]
>>
PDF/A Metadata Requirements
Attachments require metadata.
XMP metadata should describe:
<pdfaExtension:schemas>
and
<pdfaSchema:property>
definitions.
Common in:
- ZUGFeRD
- Factur-X
- XRechnung
documents.
Best Practices
Use PDF/A-3 or PDF/A-4f
If attachments are required.
Set AFRelationship
Always specify the attachment's role.
Quick Reference
| PDF/A Version | Attachments Allowed | File Types |
|---|---|---|
| PDF/A-1a | No | None |
| PDF/A-1b | No | None |
| PDF/A-2a | Yes | PDF/A only |
| PDF/A-2b | Yes | PDF/A only |
| PDF/A-2u | Yes | PDF/A only |
| PDF/A-3a | Yes | Any type |
| PDF/A-3b | Yes | Any type |
| PDF/A-3u | Yes | Any type |
| PDF/A-4 | Limited support | PDF 2.0 model |
| PDF/A-4f | Yes | Any type |
Key Takeaway
- PDF/A-1: No attachments.
- PDF/A-2: Only PDF/A attachments.
- PDF/A-3: Any file type can be embedded (XML, DOCX, XLSX, ZIP, etc.).
- PDF/A-4f: Modern PDF 2.0 archival format with attachment support.
- For e-invoicing, legal archiving, and document packages, PDF/A-3 and PDF/A-4f are the preferred standards.
Comments
Post a Comment