[opencms-dev] Remove metdata from PDF on upload
Michael Emmerich
m.emmerich at alkacon.com
Tue Nov 26 11:58:36 CET 2019
Tobias,
without having done this my idea would be the following:
Extend the org.opencms.file.types.CmsResourceTypeBinary with you own
class. There, overwrite at least the createResource method and check if
the file is a PDF. If so, use PDFBox to modify the binary content and
then call the super method of the createResource method with the
modified content.
Take a look at the CmsResoruceTypeImage as an example how to modify the
binary content in the createResource method.
You must then modify the opencms-vfs.xml to use your own class for the
resource type "binary".
This is not tested, but i think it should work.
Bye,
Michael
Am 26.11.2019 um 11:32 schrieb Tobias Karrer:
> Hi all,
>
> ist there a possibility to remove metadate (title, autor) when
> uploading PDFs to OpenCms?
>
> Where would I need to hook in, what would be needed to be patcht e.g.
> to do a processing with PDFBox before creating VFS resource?
>
> Best regards,
> Tobias
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
--
Alkacon Software GmbH & Co. KG - The OpenCms Experts
Michael Emmerich
An der Wachsfabrik 13
50996 Koeln, DE
Email: m.emmerich at alkacon.com
http://www.alkacon.com
http://www.opencms.org
Geschäftsführer: Alexander Kandzior, Amtsgericht Köln, HRB 54613
More information about the opencms-dev
mailing list