PDF metadata removal
Hi syslifters,
currently, when creating new PDF reports, the following metadata are added to the PDFs:
$ exiftool ...
producer: GPL Ghostscript 10.04.0
CreatorTool: UnknownApplication
CreateDate: 2024-10-03T11:46:04Z
ModifyDate: 2024-10-03T11:46:04Z
creation-date: 1727955964
mod-date: 1727955964
Maybe it is a good idea to put a removal tool like mat2 (https://0xacab.org/jvoisin/mat2) between the report generation, to reduce the likelihood of new metadata from lib updates etc? Just a suggestion!
Thank you! 😃
When generating the PDF weasyprint allows for custom metadata with the following option:
--custom-metadata
Thanks for the suggestion.
PDF metadata is added by Ghostscript. Ghostscript does not support removing the producer, so we have to use another tool in the post-processing step.
Implemented in https://github.com/Syslifters/sysreptor/releases/tag/2024.91
PDF metadata is removed via pikepdf after compressing PDFs via ghostscript. For non-compressed PDFs, metadata is removed via a weasyprint hook.