Page 1 of 1

display shows PDF with transparent background

Posted: 2013-02-13T09:26:05-07:00
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.

Re: display shows PDF with transparent background

Posted: 2013-02-13T10:09:42-07:00
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.

Re: display shows PDF with transparent background

Posted: 2013-02-13T15:42:56-07:00
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.