[poppler] pdftocairo - Updated Patches
Adrian Johnson
ajohnson at redneon.com
Fri Jul 16 16:37:41 PDT 2010
On 17/07/10 04:25, Stefan Thomas wrote:
> Hey Adrian & Carlos,
>
> Thanks for your comments!
>
> Carlos wrote:
>> [...] we don't need to pass a TextPage to CairoOutputDev when
>> rendering, since we are not interested in the text.
>
> Removed TextPage instance.
>
>
> Adrian wrote:
>> 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.
>
> Agreed, but this is a feature request, not a bug. Once this patchset has
> been accepted, I'll consider adding a patch to add a "-multipage"
> command line option - or you're welcome to contribute it if you like.
I disagree. My original pdftocairo patch outputted PS/PDF to one file.
That is the way it is intended to work similar to pdftops. Your patch
introduced a bug.
What is the use case for wanting one PS/PDF file per page?
> I believe the default should be individual files per page so that the
> tool behaves the same for all formats unless multipage files are
> specifically requested in which case we can output an error if the
> target format does not support multipage output.
>
>
>> 2. Memory leak - a surface is created for each page in start_page() but
>> only the last page is destroyed.
>
> Fixed.
>
>
>> 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.
>
> Fixed.
>
> Also fixed a compiler warning (unused local variable) and some very
> minor memory leaks. Patch attached, please apply on top of original
> patchset.
>
>
> Cheers,
>
> Stefan
>
>
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list