From d85e836911d661275c29f2348a047e5d911f9004 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 23 Nov 2008 21:03:22 +1030 Subject: [PATCH] PDF: Add newline to end of binary streams PDF requires white space before the "endstream" --- src/cairo-pdf-surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 6d007adc3..322c77376 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -1588,6 +1588,7 @@ _cairo_pdf_surface_emit_jpx_image (cairo_pdf_surface_t *surface, *res = surface->pdf_stream.self; _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); *width = info.width; @@ -1639,6 +1640,7 @@ _cairo_pdf_surface_emit_jpeg_image (cairo_pdf_surface_t *surface, *res = surface->pdf_stream.self; _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); *width = info.width;