Not Able to Set Pdf Transparency Color

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
gaurnitai74
Posts: 13
Joined: 2013-04-04T03:30:30-07:00
Authentication code: 6789

Not Able to Set Pdf Transparency Color

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Not Able to Set Pdf Transparency Color

Post 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.
gaurnitai74
Posts: 13
Joined: 2013-04-04T03:30:30-07:00
Authentication code: 6789

Re: Not Able to Set Pdf Transparency Color

Post 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,
Post Reply