display shows PDF with transparent background

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
dmd3eorg
Posts: 1
Joined: 2013-02-13T09:23:29-07:00
Authentication code: 6789

display shows PDF with transparent background

Post by dmd3eorg »

I use HTMLDOC to generate PDFs from HTML files.

The imagemagick "display" command displays them with transparent ('checked') background, for example http://3e.org/private/test.pdf.

Is there anything I can do to prevent this? On the HTMLDOC side, I've tried adding a tiling white background image, specifying white background with CSS, all to no avail.

The PDF displays fine in Acrobat, Evince, Chrome, and every other PDF viewer I've tried - only "display" gets it wrong.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: display shows PDF with transparent background

Post by snibgo »

I don't think this is a bug.

Most viewers (including Adobe Acrobat) show transparent as white. IM "display" shows it as chequerboard. Your PDF is mostly transparent.

You could use IM to turn transparent white ...

Code: Select all

convert test2.pdf -background White -flatten testW.pdf
... so it shows as white in "display", but this will rasterise the text.
snibgo's IM pages: im.snibgo.com
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: display shows PDF with transparent background

Post by snibgo »

Incidentally: we can verify the PDF has a transparent background by using Adobe Reader: Edit, Preferences, Page Display, tick "Show transparency grid". Then Adobe Reader, just like IM Display, shows a chequerboard.
snibgo's IM pages: im.snibgo.com
Post Reply