8

I have recently encountered a problem printing .pdf files containing transparent elements. I first noticed it when printing a document created with LaTeX that included embedded .png images with alpha channels and embedded .pdf figures with transparent elements. The document would look fine on the screen but when printed the pages containing embedded graphics would appear to be bitmapped at a low resolution.

I later found this would also occur when printing some of the .pdf figures individually so the problem is not specifically to do with LaTeX. I also found that the documents will generally print OK with Adobe Reader in Linux, but they take a very long time to print. The documents also appear to print OK with Adobe Reader in Windows. This suggests the problem lies with the Evince (the default .pdf viewer) or something in the printing sub-system between document and printer. I speculate that Adobe Reader in Linux is unaffected by the problem because it rasterizes the page images itself at an acceptable resolution or otherwise communicates with the printer differently. Unfortunately I don't know enough about Ubuntu's print sub-system to locate the source of the problem but it definitely seems like a bug.

I am using Ubuntu 12.04, Evince Document Viewer 3.4.0 using poppler/cairo (0.18.4) and CUPS 1.5.3

There are a number of related questions but the following two are the most relevant:

Flattening PDF Transparency - The best answer here is to use Acrobat Professional in Windows to flatten the transparency, but I don't have easy access to this software.

Why do some vector graphics included into a document force rasterization of the whole page and subsequently ruin the look of the text in cups? - The best answer here is to use ghostscript to convert the .pdf to a version that doesn't support transparency effects, but this simply rasterizes the file rather than flattening the transparency.

None of the answers to these questions really get to the root of the problem, i.e. how come the files print OK in Adobe Reader in Windows (and in Linux, albeit slowly) but not with the default .pdf viewer Evince?

My own workaround is simply to ensure there are no transparent elements in the .pdf figures in the first place. Where transparent effects are essential I save the figures as .png at a sufficiently high resolution for printing. If necessary any .png alpha channels can be removed using Gimp. I have found no way to flatten a .pdf in Linux without rasterizing it.

Can anyone suggest a resolution or at least a better workaround?

4
  • The root of the problem appears to me as if Evince is too simpleton to properly deal with transparencies.
    – Max Wyss
    Aug 9, 2014 at 10:59
  • I don't think the problem lies with Evince as I can also reproduce the problem using the lpr command. I have since found that the file prints perfectly on non-postscript printers so I suspect the problem is due to whatever method CUPS uses to generate postscript print data.
    – Nicholas
    Oct 21, 2014 at 22:30
  • 1
    I have been struggling with this issue more generally with pdf files from scientific journals (nature, science, annual reviews...) and it's been driving me nuts. I don't have a solution, but am glad to have a better understanding via your post. Thanks. Nov 6, 2018 at 19:48
  • My only solution is to use my Brother printer's 'Direct Print' option with a usb key. Not ideal. Nov 6, 2018 at 19:50

3 Answers 3

0

Try to use Okular.
Say if it helped.
You can use apt install okular

1
  • This did not work for me. Nov 6, 2018 at 19:49
0

Another work-around I found is to convert these PDFs to a 600 DPI .djvu file:

pdf2djvu -d 600 file.pdf > printable.djvu

Of course, it's not a PDF anymore, but these files can still be opened by Evince or Okular and Adobe Acrobat isn't required.

More details can be found at https://feeding.cloud.geek.nz/posts/printing-hard-to-print-pdfs-on-linux/.

0

A solution to print such PDFs – those that contain (partial) transparency – I found easy and useful is, to print using PDFium, which afaiu does its own rastering before printing and which is the PDF viewer built in to Chrome and many other Chromium based browsers such as Opera, Vivaldi, …

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .