diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-11-14 13:03:07 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-11-14 13:23:57 +0100 |
commit | 2216f9402a9ddf232e15fdd508b9123011af8bd3 (patch) | |
tree | 3b4e44be0e332bb9d957864fcde41057ed0fcb79 /include/mupdf/fitz/document.h | |
parent | 018253cfc8a34805c4fc1e0f955e3696db60886a (diff) | |
download | mupdf-2216f9402a9ddf232e15fdd508b9123011af8bd3.tar.xz |
Add/fix page coordinates to link targets.
Correctly transformed target coordinates for PDF.
Target coordinates for EPUB and HTML.
Diffstat (limited to 'include/mupdf/fitz/document.h')
-rw-r--r-- | include/mupdf/fitz/document.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h index d8123a00..105692e6 100644 --- a/include/mupdf/fitz/document.h +++ b/include/mupdf/fitz/document.h @@ -32,7 +32,7 @@ typedef int (fz_document_authenticate_password_fn)(fz_context *ctx, fz_document typedef int (fz_document_has_permission_fn)(fz_context *ctx, fz_document *doc, fz_permission permission); typedef fz_outline *(fz_document_load_outline_fn)(fz_context *ctx, fz_document *doc); typedef void (fz_document_layout_fn)(fz_context *ctx, fz_document *doc, float w, float h, float em); -typedef int (fz_document_resolve_link_fn)(fz_context *ctx, fz_document *doc, const char *uri); +typedef int (fz_document_resolve_link_fn)(fz_context *ctx, fz_document *doc, const char *uri, float *xp, float *yp); typedef int (fz_document_count_pages_fn)(fz_context *ctx, fz_document *doc); typedef fz_page *(fz_document_load_page_fn)(fz_context *ctx, fz_document *doc, int number); typedef int (fz_document_lookup_metadata_fn)(fz_context *ctx, fz_document *doc, const char *key, char *buf, int size); @@ -214,9 +214,11 @@ int fz_count_pages(fz_context *ctx, fz_document *doc); /* fz_resolve_link: Resolve an internal link to a page number. + xp, yp: Pointer to store coordinate of destination on the page. + Returns -1 if the URI cannot be resolved. */ -int fz_resolve_link(fz_context *ctx, fz_document *doc, const char *uri); +int fz_resolve_link(fz_context *ctx, fz_document *doc, const char *uri, float *xp, float *yp); /* fz_load_page: Load a page. |