summaryrefslogtreecommitdiff
path: root/src/cairo-pdf-surface.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2017-11-26 13:03:18 +1030
committerAdrian Johnson <ajohnson@redneon.com>2017-11-26 13:03:18 +1030
commita709197121c8e405c2dd99e408ee3046ccf50a6a (patch)
tree08817bf70e6309aa0c98f2504431929bd2343c42 /src/cairo-pdf-surface.c
parent17e2abc992b012ac3dceb2f66fba17d312ae6d77 (diff)
downloadcairo-a709197121c8e405c2dd99e408ee3046ccf50a6a.tar.gz
pdf: fix some annotation bugs
- each annotation was emitted on every page instead of just the page that contains the annotation - the document structure did not correctly link to annotation objects - fix some annotation related memory leaks
Diffstat (limited to 'src/cairo-pdf-surface.c')
-rw-r--r--src/cairo-pdf-surface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 07f9c308d..bf01fbaf6 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -6934,7 +6934,7 @@ _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface)
_cairo_pdf_surface_update_object (surface, *page);
_cairo_output_stream_printf (surface->output,
"%d 0 obj\n"
- "<< /Type /Page\n"
+ "<< /Type /Page %% %d\n"
" /Parent %d 0 R\n"
" /MediaBox [ 0 0 %f %f ]\n"
" /Contents %d 0 R\n"
@@ -6946,6 +6946,7 @@ _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface)
" >>\n"
" /Resources %d 0 R\n",
page->id,
+ page_num,
surface->pages_resource.id,
surface->width,
surface->height,