[cairo-commit] 2 commits - src/cairo-pdf-interchange.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 2 10:24:34 UTC 2021


 src/cairo-pdf-interchange.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2edcb1ac2385c670c36d7ae53ae7de1637969ced
Merge: 267d0e1c9 60d7ff988
Author: Uli Schlachter <psychon at znc.in>
Date:   Wed Jun 2 10:24:33 2021 +0000

    Merge branch 'jfkthame-master-patch-75366' into 'master'
    
    [pdf-interchange] Write trees even if only LINK tags are present
    
    Closes #487
    
    See merge request cairo/cairo!185

commit 60d7ff988b458c65d9537d4d489347b1b44f399b
Author: Jonathan Kew <jfkthame at googlemail.com>
Date:   Mon May 24 16:31:47 2021 +0000

    [pdf-interchange] Write trees even if only LINK tags are present
    
    This avoids the PDF ending up with invalid xref entries for objects that were "reserved"
    but then never output.
    
    Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/487.

diff --git a/src/cairo-pdf-interchange.c b/src/cairo-pdf-interchange.c
index 0f896d351..540b3174d 100644
--- a/src/cairo-pdf-interchange.c
+++ b/src/cairo-pdf-interchange.c
@@ -1373,7 +1373,8 @@ _cairo_pdf_interchange_write_document_objects (cairo_pdf_surface_t *surface)
     cairo_tag_stack_structure_type_t tag_type;
 
     tag_type = _cairo_tag_stack_get_structure_type (&ic->analysis_tag_stack);
-    if (tag_type == TAG_TREE_TYPE_TAGGED || tag_type == TAG_TREE_TYPE_STRUCTURE) {
+    if (tag_type == TAG_TREE_TYPE_TAGGED || tag_type == TAG_TREE_TYPE_STRUCTURE ||
+	tag_type == TAG_TREE_TYPE_LINK_ONLY) {
 
 	status = cairo_pdf_interchange_write_parent_tree (surface);
 	if (unlikely (status))


More information about the cairo-commit mailing list