Ubuntu – Flattening PDF transparency

inkscapepdfprintingvector-drawings

I have a PDF, made with Inkscape, that uses transparent colors. This image shall be used in a LaTeX document.

While preserving the transparency is nice for editing, it can be a problem for printing. Printing usually involves PDF to PS conversion. Since Postscript does not support transparency, this requires either

  • flatting, i.e. creating a vector graphic that works without transparency

or

  • rastering, i.e. rendering a bitmap image.

When a PDF document containing such a figure is printed (or converted to PS) using Evince (or Cairo or Ghostscript), the whole page gets rendered as a bitmap, rendering fonts ugly (different from other pages). (Adobe Acrobat handles such PDFs well.)

Unfortunately, converting the PDF figures to EPS (before including them with LaTeX) doesn't help much, because both pdftops and pdf2ps (again, Cairo or Ghostscript) rasterize the image, i.e. render a bitmap (saved as EPS). (This is slightly better, because it doesn't affect the whole page, but I'd still prefer a vector graphics.)

How can I flatten transparency with Inkscape or other software on Linux?

Best Answer

One way around bad rasterization is to manually convert your PDF document to postscript because when you invoke CUPS through evince or whatever gui, it will be converted anyways.

You can try pdftops -r 1200 document.pdf to increase the resolution from the low default of 300, and then print the resulting postscript. However, with the printers at work this did not yield a significant improvement. Regular text on pages with and without transparent images still looked different -- blurry vs. clear.

So I ended up using Acrobat Professional (on a windows machine) to flatten the transparent images used in my latex document, which gave optimal results. Check that Transparency Flattener Preset is at [High Resolution] in the advanced print setup. My colleague mentioned that one could perhaps FTP a pdf file directly to a modern laserjet network printer, bypassing the postscript conversion. I have not tried this.

Would be great to have linux-only solution to this issue.