[cairo-bugs] [Bug 5467] New: Multi page PDFs with clip masks

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Dec 30 12:14:06 PST 2005


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=5467          
     
           Summary: Multi page PDFs with clip masks
           Product: cairo
           Version: 1.0.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: pdf backend
        AssignedTo: krh at bitplanet.net
        ReportedBy: arno at mtb.ee
         QAContact: cairo-bugs at cairographics.org


has_clip is not cleared in _cairo_pdf_document_add_page after writing out
the Q command, causing a mild panic in Acroread when opening the next page.

The following patch cures this for me (i do not know the innards of cairo,
so this might leak memory as hell):

--- cairo-1.0.2/src/cairo-pdf-surface.c 2005-08-20 00:05:14.000000000 +0300
+++ cairo-1.0.2-work/src/cairo-pdf-surface.c    2005-12-30 21:55:44.000000000 +0200
@@ -1758,8 +1758,10 @@

     _cairo_pdf_surface_ensure_stream (surface);

-    if (surface->has_clip)
+    if (surface->has_clip) {
        _cairo_output_stream_printf (output, "Q\r\n");
+       surface->has_clip=FALSE;
+    }

     _cairo_pdf_document_close_stream (document);          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the cairo-bugs mailing list