[poppler] Proper Transparency Support in pdftops
ajohnson at redneon.com
Thu Mar 22 16:19:32 PDT 2012
On 23/03/12 08:28, Jason A. Donenfeld wrote:
> Dear Poppler Maintainers,
> Pdftops is a great utility. So great, in fact, that recent versions of
> CUPS ship with optional compile-time support for using pdftops instead
> of ghostscript. Gaining the confidence of print software is no small
> accomplishment, and poppler has proved itself to be a very complete and
> correct pdf parser.
> There is one area, however, where poppler unfortunately makes a
> significant error:
> | rasterize = scan->usesTransparency() || scan->usesPatternImageMask();|
> The PSOutputDev uses Splash to rasterize PDFs if they're found to use
> transparency or patterned image masks. While this works well for some
> use cases, for many other use cases, especially in printing,
> rasterization is the worst of all options and is often insufficient
> So I'm wondering -- is including proper support for transparency and
> patterned image masks on the schedule for the immediate future? If so,
PostScript does not support transparency.
> If not, would you consider adding a "--dont-rasterize" flag to pdftops,
> so that if PSOutputDev is unable to convert without rasterization, it
> exits with a known error code? This way, pdftops could be preferred, and
> ghostscript might function as a fallback, for the case of a scripted
> conversion utility.
It would not be hard to add this option. I'll have a look and see if I
can come up with a patch.
The best solution would be to only rasterize the regions on the page
that use transparency. The problem is there may be one small object on
the page that uses transparency and as a result the entire page is
Cairo PS output will only rasterize the regions that use transparency.
You can try "pdftocairo -ps" to see if it solves your problem.
> Thank you,
> Jason Donenfeld
> poppler mailing list
> poppler at lists.freedesktop.org
More information about the poppler