summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-11-24 16:22:35 +0100
committerTor Andersson <tor@ccxvii.net>2014-12-03 01:33:00 +0100
commit16db810d3a6733aff2ffecde0019836b9ac23673 (patch)
tree07e41aab2f21e433b5cdcb41333367eb05c935a6 /include
parent83b0d9af9e4f4e4bc296894982250a01ad7b6de9 (diff)
downloadmupdf-16db810d3a6733aff2ffecde0019836b9ac23673.tar.xz
Add fz_layout_document function.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/document.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h
index a3d0b244..e140bc3f 100644
--- a/include/mupdf/fitz/document.h
+++ b/include/mupdf/fitz/document.h
@@ -24,6 +24,7 @@ typedef void (fz_document_close_fn)(fz_document *doc);
typedef int (fz_document_needs_password_fn)(fz_document *doc);
typedef int (fz_document_authenticate_password_fn)(fz_document *doc, const char *password);
typedef fz_outline *(fz_document_load_outline_fn)(fz_document *doc);
+typedef void (fz_document_layout_fn)(fz_document *doc, float w, float h, float em);
typedef int (fz_document_count_pages_fn)(fz_document *doc);
typedef fz_page *(fz_document_load_page_fn)(fz_document *doc, int number);
typedef fz_link *(fz_document_load_links_fn)(fz_document *doc, fz_page *page);
@@ -45,6 +46,7 @@ struct fz_document_s
fz_document_needs_password_fn *needs_password;
fz_document_authenticate_password_fn *authenticate_password;
fz_document_load_outline_fn *load_outline;
+ fz_document_layout_fn *layout;
fz_document_count_pages_fn *count_pages;
fz_document_load_page_fn *load_page;
fz_document_load_links_fn *load_links;
@@ -148,6 +150,14 @@ int fz_authenticate_password(fz_document *doc, const char *password);
fz_outline *fz_load_outline(fz_document *doc);
/*
+ fz_layout_document: Layout reflowable document types.
+
+ w, h: Page size in points.
+ em: Default font size in points.
+*/
+void fz_layout_document(fz_document *doc, float w, float h, float em);
+
+/*
fz_count_pages: Return the number of pages in document
May return 0 for documents with no pages.