Repository navigation
Keep an annotation's subject under PDF/A-2 and PDF/A-3 (#350) - #357
Merged
jakejackson1 merged 1 commit intoSep 22, 2026
Merged
Conversation
/Subj was left out under any PDF/A or PDF/X setting because it is a PDF 1.5 key. PDF/A-2 and PDF/A-3 are based on PDF 1.7, so it is now left out only under PDF/X-1a and PDF/A-1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 23, 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.
Stacks on #330.
Change
Writer\MetadataWriter::writeAnnotations()left out/SubjwheneverPDFAorPDFXwas set, because/Subjarrived in PDF 1.5. That is right for PDF/X-1a (PDF 1.3) and PDF/A-1 (PDF 1.4), but PDF/A-2 and PDF/A-3 are based on PDF 1.7. The condition now omits/Subjonly under PDF/X or whenMpdf::pdfaConformance()names part 1. Only the/Subjcondition and its comment change.Tests
PDFA2Test::testAnnotationSubject: an annotation with a subject keeps/Subjin a plain document and under 2-B and 3-B, and loses it under 1-B and PDF/X-1a. Without the fix, the 2-B and 3-B cases fail.PdfaConformanceTest::testDocumentConformsnow gives a subject to one of its annotations, so veraPDF checks that 2-B/2-U/3-B/3-U with RGB and CMYK output intents still conform.Gates
composer test: OK (3227 tests, 5 skipped, the same as the base)vendor/bin/phpunit --group=conformance --fail-on-skipped: OK (10 tests)composer cs: cleanphpstan --no-progress --memory-limit=2G: no errorsphp5.6 -lon the changed files: no syntax errorsFixes #350
🤖 Generated with Claude Code