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);
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.