[poppler] pdftocairo - Updated Patches

Stefan Thomas thomas at txtbear.com
Fri Jul 16 11:55:56 PDT 2010


  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 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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Minor-fixes-based-on-reviewer-feedback-memory-leaks-.patch
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100716/5ddb285a/attachment.ksh>


More information about the poppler mailing list