From 2ba9166cfb7590e3422d691418353de027276c17 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 12 Oct 2017 13:58:00 +0200 Subject: 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! --- include/mupdf/pdf/document.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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; -- cgit v1.2.3