Hello,
I'm converting jpeg images into PDF via ImageMagick. It works absouletely perfectly, if i use some options (-density, -geometry, etc.). But there's problem in result PDF's properties.
I need to remove message "Created by ImageMagick, http://www.imagemagick.org
Any way to do this?
Many thanks for help.
PDF tags
Re: PDF tags
To remove the producer statement, edit the ImageMagick source coders/pdf.c and remove or comment out these lines:
Now rebuild and reinstall ImageMagick.
Code: Select all
(void) FormatMagickString(buffer,MaxTextExtent,"/Producer (%s)\n",
EscapeParenthesis(GetMagickVersion((unsigned long *) NULL)));
(void) WriteBlobString(image,buffer);
Re: PDF tags
I'm sorry for necroposting here, but I need to solve this same problem on Windows where I have no means to recompile the binary. Is it possible nowadays to remove PDF Producer statement with some CLI option? I think this should be implemented somehow as this can easily reveal private directory names to the world.
I generate my PDF with:
and get a PDF which has "PDF Producer" set to
(two backslashes and index.html at the end).
I also experiment with the -set option but it either doesn't work or I use it wrong.
I tried "/Producer", as this string is in coders/pdf.c code, and "Producer" too.
ImageMagick is 7.0.7-21-portable-Q16-x64 and I view PDF in Acrobat Reader DC 2018.009.20050.
I generate my PDF with:
Code: Select all
C:\temp\ImageMagick\magick convert 1.png 2.png -units PixelsPerInch -density 212x212 Cover.pdf
Code: Select all
C:\temp\ImageMagick\\index.html
I also experiment with the -set option but it either doesn't work or I use it wrong.
Code: Select all
C:\temp\ImageMagick\magick convert 1.png 2.png -units PixelsPerInch -density 212x212 -set "/Producer" "TestTestTest" Cover.pdf
ImageMagick is 7.0.7-21-portable-Q16-x64 and I view PDF in Acrobat Reader DC 2018.009.20050.