[Poppler-bugs] [Bug 104864] New: poppler_page_render_for_printing on cairo_pdf_surface repeats content

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 30 17:26:28 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104864

            Bug ID: 104864
           Summary: poppler_page_render_for_printing on cairo_pdf_surface
                    repeats content
           Product: poppler
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: cairo backend
          Assignee: poppler-bugs at lists.freedesktop.org
          Reporter: jsagarribay at gmail.com

Created attachment 137056
  --> https://bugs.freedesktop.org/attachment.cgi?id=137056&action=edit
Test program

I am writing a small utility to manipulate PDF files. It loads input files, let
the user delete, duplicate or reorder pages and then calls
poppler_page_render_for_printing in the desired output order, using a
cairo_pdf_surface. It worked fine until testing with certain scanned PDF, where
it outputs the same page each time.

I'll attach a C test program (compile with gcc test.c `pkg-config --cflags
--libs poppler-glib cairo gobject-2.0 gio-2.0`) and two input PDF (zma_001.pdf
and zma_002.pdf). Called as "./a.out zma_001.pdf zma_002.pdf output.pdf" is
expected to create output.pdf with both input pages concatenated, but the first
page appears twice (but clipped to the second page's dimensions).

The expected output is generated when using poppler_page_render instead of
poppler_page_render_for_printing but this makes bigger files (maybe resamples
the images?).

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180130/f1b1f3e4/attachment.html>


More information about the Poppler-bugs mailing list