Package sk.iway.iwcm.system.metadata
Class MetadataCleanerPdf
java.lang.Object
sk.iway.iwcm.system.metadata.MetadataCleanerPdf
Utility class for cleaning sensitive metadata from generated files.
Currently supports PDF files generated by PD4ML (pdf-gen).
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidremoveMetadata(ByteArrayOutputStream pdfOut, OutputStream output) Post-process a generated PDF to override Creator and Producer metadata fields, preventing disclosure of the PD4ML library name and version in PDF metadata.
-
Method Details
-
removeMetadata
public static void removeMetadata(ByteArrayOutputStream pdfOut, OutputStream output) throws IOException Post-process a generated PDF to override Creator and Producer metadata fields, preventing disclosure of the PD4ML library name and version in PDF metadata. The replacement value is taken from the pdfAuthorName configuration constant.- Parameters:
pdfOut- the ByteArrayOutputStream containing the generated PDF bytesoutput- the final OutputStream to write the processed PDF to- Throws:
IOException- if reading or writing fails
-