[poppler] Getting a raster image like pdf2ppm

Angus March angus at uducat.com
Wed May 20 08:45:17 PDT 2009


Adrian Johnson wrote:
> Angus March wrote:
>>     It was definitely an improvement, but I think the only thing that
>> did improve was the resolution. The old problems that caused me to
>> abandon Cairo persisted, which are: gradients have ugly stripes on them,
>> a background that should be white and opaque is black and transparent,
>> and some text that has a shadow in the PDF doesn't in the image. I don't
>> suppose you know of a way to deal w/those problems.
>
> The striped gradients are a known bug. The black transparent
> background is a bug in my code. The surface should be painted white by
> calling:
>
>   cairo_set_source_rgb (cr, 1, 1, 1);
>   cairo_paint (cr);
>
> after creating the image surface.
>
> I don't know what the text shadow problem is without seeing the PDF.
> Is it similar to the effect in:
>
> http://bugs.freedesktop.org/show_bug.cgi?id=20668#c7 (correct rendering)
> http://bugs.freedesktop.org/show_bug.cgi?id=20668#c8 (poppler/cairo)
    Well, those PDFs don't quite demonstrate the problem I'm seeing, but
the "incompletely rendering" description that the reporter gives could
be the problem. Is there a way I can get the binaries that I have to you?

    But as far as I'm concerned, unless the striped gradient is fixed,
and soon, Cairo is not an acceptable solution. I'd have to go with a
Splash solution or even worse, an exec*() call to pdftoppm (followed by
a torturous procedure for turning the PPM files into something I can
use). :(


More information about the poppler mailing list