diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2013-08-24 23:07:06 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2013-08-24 23:38:02 +0200 |
commit | 0bfe9501ebc2e2a2329a5435100ef189b6166219 (patch) | |
tree | bd9ea782ecf2722ce9c51979810778bf48d7107e /include | |
parent | 8ac325e2550a509995bbad5a28c09c4a3ded0dc1 (diff) | |
download | mupdf-0bfe9501ebc2e2a2329a5435100ef189b6166219.tar.xz |
Support named destinations in remote link annotations.
Previously there was a bug when parsing GoToR link annotations that had
a named destination. mupdf incorrectly attempted to resolve the
destination in the current document. Now the destination name is
present in the link objects returned to the application so it can
resolve any names for GoToR links in the remote document instead.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/link.h | 10 | ||||
-rw-r--r-- | include/mupdf/pdf/annot.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/mupdf/fitz/link.h b/include/mupdf/fitz/link.h index 65a77fd2..7a400851 100644 --- a/include/mupdf/fitz/link.h +++ b/include/mupdf/fitz/link.h @@ -47,7 +47,14 @@ enum { For FZ_LINK_GOTO or FZ_LINK_GOTOR: gotor.page: The target page number to move to (0 being the - first page in the document). + first page in the document). In the FZ_LINK_GOTOR case, the + page number either refers to to the file specified by + gotor.file_spec, or the page number is -1 suggesting that + the destination is given by gotor.dest. + + gotor.dest: If set, the target destination name to be + resolved in the file specified by gotor.file_spec. Always + NULL in the FZ_LINK_GOTO case. gotor.flags: A bitfield consisting of fz_link_flag_* describing the validity and meaning of the different parts @@ -97,6 +104,7 @@ struct fz_link_dest_s struct { int page; + char *dest; int flags; fz_point lt; fz_point rb; diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index d6950970..bf912ef9 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -56,7 +56,7 @@ struct pdf_annot_s int widget_type; }; -fz_link_dest pdf_parse_link_dest(pdf_document *doc, pdf_obj *dest); +fz_link_dest pdf_parse_link_dest(pdf_document *doc, fz_link_kind kind, pdf_obj *dest); fz_link_dest pdf_parse_action(pdf_document *doc, pdf_obj *action); pdf_obj *pdf_lookup_dest(pdf_document *doc, pdf_obj *needle); pdf_obj *pdf_lookup_name(pdf_document *doc, char *which, pdf_obj *needle); |