danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.93k stars 360 forks source link

Allow setting an override for `createdDate` in `PdfRendererBuilder` #980

Open andy-clapson opened 2 months ago

andy-clapson commented 2 months ago

In a similar fashion to this PR: https://github.com/danfickle/openhtmltopdf/pull/158, it would be dynamite to be able to specify/override the createdDate in the builder in the saem style as the producer.

My use case is to set some fixed createdDate value - there are cases when I want to generate a PDF with identical inputs and have a hash of the document remain fixed. While having a "true" createdDate value is useful in many cases, there are times (like in automated testing) where it would be useful to be able to hash documents, and be able to rely on there being no volatile, changing tags that might break the hash.