[poppler] Getting a raster image like pdf2ppm

Albert Astals Cid aacid at kde.org
Fri May 15 15:21:01 PDT 2009


A Divendres, 15 de maig de 2009, Angus March va escriure:
> I tried using Poppler to get a Cairo surface and then saving the surface
> to a PNG. Unfortunately, the resulting image was of disastrously low
> quality. The executable pdftoppm, on the other hand, yields perfect
> results. I've tried to hack through its code, though, and it seems that
> the "Splash" interface is the one I'm looking for. Unfortunately, it's
> not documented, and the interface has changed over the years. Not only
> that, but I get a fair number of seg faults using it. Can someone give
> me some help in using it?

See pdftoppm code, it's 275 lines and 114 are there just to describe the 
options. Should be quite straightforward to understand how to use it.

>     Here are some valgrind reports that might be part of the seg faults.
> Notice how there are messages like "Address 0x10 is not stack'd,
> malloc'd or (recently) free'd". 0x10 doesn't sound like an address. It
> looks like an integer that is being used as an address.
>

That happens with pdftoppm or with your code?

Albert


More information about the poppler mailing list