[poppler] Getting a raster image like pdf2ppm

Angus March angus at uducat.com
Tue May 19 06:52:15 PDT 2009


Albert Astals Cid wrote:
> 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.
>   
    Like I said, I've already tried hacking through the code, and it
does seem straightforward, but for some reason my results are different.
I need help w/the Splash interface.

>>     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?
>   
    That happens with my code.


More information about the poppler mailing list