Bug 5467 - Multi page PDFs with clip masks
Summary: Multi page PDFs with clip masks
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: pdf backend (show other bugs)
Version: 1.0.2
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Kristian Høgsberg
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-31 07:09 UTC by Arno Pedusaar
Modified: 2007-08-18 01:09 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Arno Pedusaar 2005-12-31 07:09:53 UTC
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);
Comment 1 Chris Wilson 2007-08-18 01:09:43 UTC
Inspecting current source reveals that _cairo_pdf_surface_write_page() does reset the clip after use.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.