diff options
author | Tor Andersson <tor@ccxvii.net> | 2017-02-02 15:55:40 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-02-06 17:10:40 +0100 |
commit | c100c4c77a88782ba5c4634994171db611952d44 (patch) | |
tree | 5dc9e03790f4eebd0586ed21510465ad8f831a85 /source/fitz/document.c | |
parent | 931f3d9a6c3ab0fbfa3e365fe040e1b86c47e9fc (diff) | |
download | mupdf-c100c4c77a88782ba5c4634994171db611952d44.tar.xz |
Add bookmarks so we can find a location after reflowing a document.
Diffstat (limited to 'source/fitz/document.c')
-rw-r--r-- | source/fitz/document.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/fitz/document.c b/source/fitz/document.c index 684c8523..41abb736 100644 --- a/source/fitz/document.c +++ b/source/fitz/document.c @@ -182,6 +182,20 @@ fz_is_document_reflowable(fz_context *ctx, fz_document *doc) return doc ? doc->is_reflowable : 0; } +fz_bookmark fz_make_bookmark(fz_context *ctx, fz_document *doc, int page) +{ + if (doc && doc->make_bookmark) + return doc->make_bookmark(ctx, doc, page); + return (fz_bookmark)page; +} + +int fz_lookup_bookmark(fz_context *ctx, fz_document *doc, fz_bookmark mark) +{ + if (doc && doc->lookup_bookmark) + return doc->lookup_bookmark(ctx, doc, mark); + return (int)mark; +} + int fz_needs_password(fz_context *ctx, fz_document *doc) { |