Return-path: Envelope-to: cworth@localhost Delivery-date: Fri, 27 Nov 2009 04:50:53 -0800 Received: from localhost ([127.0.0.1] helo=yoom.home.cworth.org) by yoom.home.cworth.org with esmtp (Exim 4.69) (envelope-from ) id 1NE0Hk-0008Lf-W7 for cworth@localhost; Fri, 27 Nov 2009 04:50:53 -0800 X-Original-To: cworth@cworth.org Delivered-To: cworth@cworth.org Received: from olra.theworths.org [82.165.184.25] by yoom.home.cworth.org with IMAP (fetchmail-6.3.9-rc2) for (single-drop); Fri, 27 Nov 2009 04:50:52 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A35EC431FBC for ; Fri, 27 Nov 2009 04:50:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.93 X-Spam-Level: X-Spam-Status: No, score=-1.93 tagged_above=-999 required=2 tests=[AWL=-0.931, BAYES_50=0.001, RCVD_IN_DNSWL_LOW=-1] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 58abAJlDmp9X for ; Fri, 27 Nov 2009 04:50:19 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by olra.theworths.org (Postfix) with ESMTP id ED626431FAE for ; Fri, 27 Nov 2009 04:50:18 -0800 (PST) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC2099F6BA; Fri, 27 Nov 2009 04:50:18 -0800 (PST) X-Original-To: cairo-commit@cairographics.org Delivered-To: cairo-commit@cairographics.org Received: from kemper.freedesktop.org (kemper.freedesktop.org [131.252.210.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 36C809F643 for ; Fri, 27 Nov 2009 04:50:17 -0800 (PST) Received: by kemper.freedesktop.org (Postfix, from userid 2987) id C147710051; Fri, 27 Nov 2009 04:50:16 -0800 (PST) To: cairo-commit@cairographics.org X-Git-Repository: git://git.cairographics.org/git/cairo Message-Id: <20091127125016.C147710051@kemper.freedesktop.org> Date: Fri, 27 Nov 2009 04:50:16 -0800 (PST) From: ajohnson@kemper.freedesktop.org (Adrian Johnson) Subject: [cairo-commit] src/cairo-pdf-surface.c X-BeenThere: cairo-commit@lists.cairographics.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: cairo@cairographics.org List-Id: CVS commit messages for cairo List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: cairo-commit-bounces@lists.cairographics.org Errors-To: cairo-commit-bounces@lists.cairographics.org src/cairo-pdf-surface.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 02d7e123d640d62db46ef03d7faecbc7598444e1 Author: Adrian Johnson Date: Fri Nov 27 23:11:56 2009 +1030 PDF: Remove extraneous \n from end of jpeg/jp2 data PDF requires a '\n' between the end of stream data and the "endstream" that is not included in the stream length. Ensure this is always added in _close_stream where it is not included in the stream length. Previously the jpeg/jp2 embedding functions were adding the '\n'. This resulted in the '\n' becoming part of the stream data. diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 62178dc..e8335f0 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -1332,13 +1332,12 @@ _cairo_pdf_surface_close_stream (cairo_pdf_surface_t *surface) surface->output = surface->pdf_stream.old_output; _cairo_pdf_operators_set_stream (&surface->pdf_operators, surface->output); surface->pdf_stream.old_output = NULL; - _cairo_output_stream_printf (surface->output, - "\n"); } length = _cairo_output_stream_get_position (surface->output) - surface->pdf_stream.start_offset; _cairo_output_stream_printf (surface->output, + "\n" "endstream\n" "endobj\n"); @@ -2010,7 +2009,6 @@ _cairo_pdf_surface_emit_jpx_image (cairo_pdf_surface_t *surface, return status; _cairo_output_stream_write (surface->output, mime_data, mime_data_length); - _cairo_output_stream_printf (surface->output, "\n"); status = _cairo_pdf_surface_close_stream (surface); return status; @@ -2058,7 +2056,6 @@ _cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t *surface, return status; _cairo_output_stream_write (surface->output, mime_data, mime_data_length); - _cairo_output_stream_printf (surface->output, "\n"); status = _cairo_pdf_surface_close_stream (surface); return status; _______________________________________________ cairo-commit mailing list cairo-commit@lists.cairographics.org http://lists.cairographics.org/mailman/listinfo/cairo-commit