Page 1 of 1

Not Able to Set Pdf Transparency Color

Posted: 2013-04-04T04:02:26-07:00
by gaurnitai74
Hi Experts,
I am using the following 2 commands successfully to replace PDF transparency color with any custom color:

convert.exe Transparent.pdf -background #FF0077 -flatten -resize 400x400 Transparency-1.jpg

convert.exe Transparent.pdf[0] -bordercolor #FF0077 -border 0 -alpha off -resize 400x400 Transparency-1.jpg

This works fine for most PDF files but has no effect on the attached sample PDF file below. Could you please let me know if this is a bug?
I am using ImageMagick 6.7.4-10 version due to colorspace changes in 6.7.5+ versions.

Works:
http://temp-share.com/show/dPf3apAtW

Does Not Work
http://temp-share.com/show/HKdPx651A
password: santa

Thanks in advance for your assistance,
Vimal

Re: Not Able to Set Pdf Transparency Color

Posted: 2013-04-04T10:06:32-07:00
by fmw42
the second image you posted downoads as totally white and no characters that I can see, unless they are white also!

The way I would process your image would be as follows:


convert works.pdf[0] -fuzz XX% -transparent white -background red -flatten works.jpg

Choose XX% to the smallest value that does not leave antialiased white in the result.

Re: Not Able to Set Pdf Transparency Color

Posted: 2013-04-04T10:51:04-07:00
by gaurnitai74
Hi,
Thanks for the reply. Yes, the Pdf has white design patterns. To see it in Acrobat reader -> Preferences -> Page Display -> Display Transparency Grid

I tried the command you suggested but I still have the same issue; does not work with the problematic pdf.

This did the trick however:

convert.exe -colorspace RGB does_not_work.pdf[0] -background red -flatten -colorspace RGB works.jpg

viewtopic.php?f=1&t=13462

Thanks & Regards,