in the moment i run into several problems by converting a PDF file to PNG. The transparence is lost from the source pdf file.
I have tested the following terminal tools to create the png: GhostScript, Imagemagick and pdf tools from poppler-tools, always on a debian system.
The image should have the same dimension as the pdf, also the same transparency.
used commands:
gs -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=test%d.png -r96 -q design.pdf -c quit
convert design.pdf test%d.png
convert design.pdf -channel rgba -alpha on PNG32:test%d.png
convert -background none -colorspace srgb design.pdf -colorspace srgb -channel rgba -alpha on PNG32:test%d.png
pdftoppm -png file.pdf test
The result is not the expected png with transparency. The Background is white, should be 100% transparent. Additionaly there is a green bar and should be semi-transparent. In all my tries the result ends up in a lighter green box with no transparency.
To see my result, i have uploaded the source pdf, faulty created png and the expected result (export from photoshop).
PDF: http://speedy.sh/W75HP/source-file.pdf
Result: http://speedy.sh/hfZMt/faulty-created-design.png
Expected: http://speedy.sh/7mpEk/design-the-way-it-should-be.png
I managed to get the white background to be transparent, but the actual file transparency including the semi-transparent green bar/box is not converted properly.
Whats the solution for my issue?
Best regards, Chris
//UPDATE Okay we have found a solution with another 3th party tool which produces my expected result on a easy way.
inkscape design.pdf -z --export-dpi=100 --export-png=design.png
Thx for help