Repository navigation
Conversation
When a creation date is set with FOUserAgent.setCreationDate(), use it for xmp:MetadataDate, the page piece LastModified date and the dates of embedded files too, not only for /CreationDate and xmp:CreateDate. The file ID keeps the current time, as ISO 32000-1 14.4 recommends. The new PDF renderer option file-id-from-creation-date (default false) uses the creation date for it instead. The new command line option -creationdate sets the creation date and enables that option, so that the fop command can give the same PDF for the same input, as the API can.
This was referenced Nov 3, 2026
Closed
Author
|
CI on my fork for this commit passes all 10 jobs (Java 8 to 25, Linux and Windows): https://github.com/vejeta/xmlgraphics-fop/actions/runs/41685896137 |
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.
https://issues.apache.org/jira/browse/FOP-3367
When a creation date is set with
FOUserAgent.setCreationDate(), FOP uses it for/CreationDateandxmp:CreateDatebut not for the other dates it writes, so the same input and creation date never give the same PDF.IFRenderer,PDFRenderingUtil,PDFEmbeddedFile:xmp:MetadataDate, the page pieceLastModifieddate and the dates of embedded files use the creation date when one is set, the current time otherwise.file-id-from-creation-date, defaultfalse. When enabled,FileIDGeneratorhashes the creation date instead of the current time. Without it the file ID is computed as before, as ISO 32000-1 14.4 recommends.-creationdate(ISO 8601), which sets the creation date and enables that option. No environment variable is read.With
-creationdateand a fixed Java time zone (-Duser.timezone=UTC), two runs at different times and with differentTZgive the same PDF. Without a creation date nothing changes.Tests:
PDFCreationDateTestCase(new),PDFPagePieceTestCase,CommandLineOptionsTestCase. The full fop-core suite passes (3736 tests) and checkstyle reports no violations.