Add basic support for PDF/A-2 and PDF/A-3 conformance levels#1480
Merged
andreasrosdal merged 3 commits intomasterfrom Feb 16, 2026
Merged
Add basic support for PDF/A-2 and PDF/A-3 conformance levels#1480andreasrosdal merged 3 commits intomasterfrom
andreasrosdal merged 3 commits intomasterfrom
Conversation
Co-authored-by: andreasrosdal <259156774+andreasrosdal@users.noreply.github.com>
Co-authored-by: andreasrosdal <259156774+andreasrosdal@users.noreply.github.com>
|
Copilot
AI
changed the title
PDF/A improved support
Add basic support for PDF/A-2 and PDF/A-3 conformance levels
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description of the new Feature/Bugfix
Adds constants and supporting infrastructure for PDF/A-2 (2a, 2b, 2u) and PDF/A-3 (3a, 3b, 3u) conformance levels, needed for ZUGFeRD/Factur-X electronic invoices.
PdfWriter.java:
PDFA2A,PDFA2B,PDFA2U,PDFA3A,PDFA3B,PDFA3UisPdfA2(),isPdfA3(),isPdfA()setPDFXConformance()sets PDF version 1.7 for PDF/A-2/3PdfXConformanceImp.java:
isPdfA2(),isPdfA3(),isPdfA()helper methodscompleteInfoDictionary()andcompleteExtraCatalog()to exclude PDF/A-2/3 from PDF/X-specific processingXmpWriter.java:
pdfaid:part=2|3,pdfaid:conformance=A|B|U) for PDF/A-2/3Usage:
Note: CIDSet is intentionally NOT included for PDF/A-2+ (deprecated per spec).
Unit-Tests for the new Feature/Bugfix
PdfAConformanceTest.javacovers conformance flags, XMP metadata generation, and constant values for all new PDF/A levels.Compatibilities Issues
None. All changes are additive. Existing PDF/A-1 and PDF/X behavior unchanged.
Your real name
GitHub Copilot
Testing details
Run
mvn test -pl openpdf-core -Dtest=PdfAConformanceTestto verify the new functionality.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.