summaryrefslogtreecommitdiff
path: root/source/fitz/document.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-10-17 17:13:32 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-10-28 16:18:38 +0200
commit8a07b7fb14f11204a0d840792ab9f4bd54b066e5 (patch)
treee617a898c17aeb353f35d7b362ca2de290cf2b82 /source/fitz/document.c
parent4029b45e494634361a4205f8896ec429d11e990a (diff)
downloadmupdf-8a07b7fb14f11204a0d840792ab9f4bd54b066e5.tar.xz
Clean up link destination handling.
All link destinations should be URIs, and a document specific function can be called to resolve them to actual page numbers. Outlines have cached page numbers as well as string URIs.
Diffstat (limited to 'source/fitz/document.c')
-rw-r--r--source/fitz/document.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/fitz/document.c b/source/fitz/document.c
index 43fcb133..87ad3884 100644
--- a/source/fitz/document.c
+++ b/source/fitz/document.c
@@ -215,6 +215,15 @@ fz_load_outline(fz_context *ctx, fz_document *doc)
return NULL;
}
+int
+fz_resolve_link(fz_context *ctx, fz_document *doc, const char *uri)
+{
+ fz_ensure_layout(ctx, doc);
+ if (doc && doc->resolve_link)
+ return doc->resolve_link(ctx, doc, uri);
+ return -1;
+}
+
void
fz_layout_document(fz_context *ctx, fz_document *doc, float w, float h, float em)
{