summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-10-12 13:58:00 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-10-12 15:18:07 +0200
commit2ba9166cfb7590e3422d691418353de027276c17 (patch)
tree2cb360770c5fa15dc412b33409d64f6962832cf9 /include
parent595e923e6ef87d86c1455665a2ffbececf2f44ed (diff)
downloadmupdf-2ba9166cfb7590e3422d691418353de027276c17.tar.xz
Don't cache page count in pdf_document.
Make sure any changes to the page tree are always reflected immediately. The rev_page_map lookup cache exists when we load the outlines in order to resolve links faster, so we don't need to worry about that one. The linear_page_refs stuff is more troublesome, so don't mix editing a PDF with progressive loading!
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/pdf/document.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h
index 8aaa91dc..0f4467e8 100644
--- a/include/mupdf/pdf/document.h
+++ b/include/mupdf/pdf/document.h
@@ -586,7 +586,7 @@ struct pdf_document_s
int freeze_updates;
int has_xref_streams;
- int page_count;
+ int rev_page_count;
pdf_rev_page_map *rev_page_map;
int repair_attempted;
@@ -595,6 +595,7 @@ struct pdf_document_s
int file_reading_linearly;
fz_off_t file_length;
+ int linear_page_count;
pdf_obj *linear_obj; /* Linearized object (if used) */
pdf_obj **linear_page_refs; /* Page objects for linear loading */
int linear_page1_obj_num;