Page 1 of 1
PDF tags
Posted: 2009-11-04T07:38:34-07:00
by pernajz
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.
Re: PDF tags
Posted: 2009-11-04T09:54:10-07:00
by magick
To remove the producer statement, edit the ImageMagick source coders/pdf.c and remove or comment out these lines:
Code: Select all
(void) FormatMagickString(buffer,MaxTextExtent,"/Producer (%s)\n",
EscapeParenthesis(GetMagickVersion((unsigned long *) NULL)));
(void) WriteBlobString(image,buffer);
Now rebuild and reinstall ImageMagick.
Re: PDF tags
Posted: 2009-11-05T03:46:08-07:00
by pernajz
Well,
thanks for amazingly quick reply.
Re: PDF tags
Posted: 2018-02-11T03:18:51-07:00
by EvgeniyK
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:
Code: Select all
C:\temp\ImageMagick\magick convert 1.png 2.png -units PixelsPerInch -density 212x212 Cover.pdf
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.
Code: Select all
C:\temp\ImageMagick\magick convert 1.png 2.png -units PixelsPerInch -density 212x212 -set "/Producer" "TestTestTest" Cover.pdf
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.