diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2021-05-24 16:31:47 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2021-05-24 16:31:47 +0000 |
commit | 60d7ff988b458c65d9537d4d489347b1b44f399b (patch) | |
tree | 2a051a81f888fb2e3acb333c3a8828fa4d4419a3 /src/cairo-pdf-interchange.c | |
parent | 3894a1ab3322ce6c71c626daca814b4a7ac0d299 (diff) | |
download | cairo-60d7ff988b458c65d9537d4d489347b1b44f399b.tar.gz |
[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.
Diffstat (limited to 'src/cairo-pdf-interchange.c')
-rw-r--r-- | src/cairo-pdf-interchange.c | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |