Skip to content

FOP-3367: Use the user agent creation date for xmp:MetadataDate - #133

Closed
vejeta wants to merge 1 commit into
apache:mainfrom
vejeta:metadata-date-only
Closed

vejeta wants to merge 1 commit into
apache:mainfrom
vejeta:metadata-date-only

Conversation

@vejeta

@vejeta vejeta commented Nov 3, 2026 •

Copy link
Copy Markdown

https://issues.apache.org/jira/browse/FOP-3367

Smaller alternative to #132, with only the part that was not questioned in the JIRA issue: when a creation date is set with FOUserAgent.setCreationDate(), use it for xmp:MetadataDate too, so it matches xmp:CreateDate and /CreationDate. The file ID is not touched.

  • IFRenderer and PDFRenderingUtil: MetadataDate is the creation date when one is set, the current time otherwise.
  • New test PDFCreationDateTestCase: fails on main (1301bcf) and passes with this change.

On its own this does not give the same PDF twice, because the file ID still uses the current time. #132 adds an opt in option for the file ID that does. Please merge whichever you prefer.

The full fop-core suite passes (3730 tests) and checkstyle reports no violations.

When a creation date is set with FOUserAgent.setCreationDate(), use it
for xmp:MetadataDate too, so it matches xmp:CreateDate and
/CreationDate. Without a creation date the current time is used, as
before.
@vejeta

vejeta commented Nov 3, 2026

Copy link
Copy Markdown
Author

Superseded by #134, which keeps the current time in the file ID by default.

@vejeta vejeta closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant