I found much easier solution, pdftk A=oldpdf.pdf cat A output newpdf.pdf
. This removes all metadata and also the attachments.
Yes but in my case the pdf file is big and I libreoffice draw hangs. Also i found another solution (added that to post).
That worked but it removed bookmarks. I added solution to the post.
Sorry, but that is for image extraction.
I am talking about removing them from pdf. For extracting them this works pdftk [pdf_file.pdf] unpack_files
.
Can you give some resources on how to do so.