[poppler] pdftocairo - Updated Patches

Adrian Johnson ajohnson at redneon.com
Fri Jul 16 03:55:52 PDT 2010


On 16/07/10 02:28, Carlos Garcia Campos wrote:
> Excerpts from Albert Astals Cid's message of jue jul 15 18:04:06 +0200 2010:
>> A Dijous, 15 de juliol de 2010, Stefan Thomas va escriure:
>>>>    * You or someone else want to mantain it (so that we don't end with
>>>>    another
>>>>
>>>> pdftoabw)
>>>
>>> Sure, why not. (Spoken with genuine naïvité.)
>>
>> Famous last words ;-)
>>
>>>
>>> But if there's a bug filed against pdftocairo in Bugzilla, somebody's
>>> gotta put me on CC, cause I don't monitor that.
>>>
>>>>    * Someone provides a cmake buildsystem patch (should be easy, maybe
>>>>    even i
>>>>
>>>> could do that if previous ones are met)
>>>
>>> Done. See attached.
>>>
>>> I also wrote a simple manpage.
>>
>> So i guess all we need is a reviewer now, Carlos can you do that?
>
> Patches look good to me, just a minor comment, we don't need to pass a
> TextPage to CairoOutputDev when rendering, since we are not interested
> in the text.

Some additional review comments:

1. PS/PDF should output all pages to the one file as these file types
support multiple pages. SVG also supports multipage if
cairo_svg_surface_restrict_to_version() is called to set the version to
1.2.

2. Memory leak - a surface is created for each page in start_page() but
only the last page is destroyed.

3. For correct handling of PDFs with transparency, the jpeg surface
should use ARGB32 the same as PNG. Remove the code that paints a white
background if the output is jpeg. There is already code at line 272 in
render_page() that blends the image into a white background.


>
>> Albert
>>
>>>
>>>
>>> Cheers,
>>>
>>> Stefan
>>>
>>>
>>> _______________________________________________
>>> poppler mailing list
>>> poppler at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/poppler



More information about the poppler mailing list