Page 1 of 1

Preserving transparency when converting PDFs

Posted: 2010-10-04T14:53:43-07:00
by magickmania
Hello,

I am trying to preserve transparency within my PDF during the convert process. My original PDF has a transparent background, when I resize and convert to another file, the resized area within the new PDF is transparent, however, the transparent areas within the original PDF becomes white.

The command I am using to do the conversion/resize is:
convert -size 1366x736 -resize "683x368>" -density 300 -background none -gravity center -extent 683x368 sample2.pdf sample_resized.pdf

where sample2.pdf is the original file, and sample_resized.pdf is the resized file. I have also tried converting the original pdf to a png (changed the -sDEVICE to pngalpha in the delegates.xml file) and then converted from png to pdf, but that didn't work.
The original file is posted here: http://app01.brandconstructionkit.com/tmp/sample2.pdf

Any suggestions would be greatly appreciated.

Thank You.

Re: Preserving transparency when converting PDFs

Posted: 2010-10-05T21:40:54-07:00
by anthony
See A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector

Re: Preserving transparency when converting PDFs

Posted: 2010-10-07T12:08:46-07:00
by magickmania
Anthony, thank you for that link. Basically, conversion from one vector to another vector image (in this case, PDF to PDF) will yield unacceptable results when using Image Magick. What if I converted the transparent PDF to a PNG, and then used that PNG to re-convert back to PDF, would that preserve the transparency from the original PDF?

Also, if it was possible to maintain transparency when converting from PDF to PNG, what parameters do I need to add to this command to do that sort of a conversion:

convert -size 1366x736 -resize "683x368>" -density 300 -background none -gravity center -extent 683x368 sample.pdf sample_resized.pdf

Again, any help would be greatly appreciated.

Thank You!