summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Reinhardt <simon.reinhardt@stud.uni-regensburg.de>2015-10-08 09:49:27 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-10-14 13:40:24 +0200
commitfa69ea8c236d5f58d6b158928a94ef527aa23457 (patch)
tree6700d9acf1a56d6221413cd3d864e939d802a885
parent4f3c3738a12308b64599277beb955daf82b2d46d (diff)
downloadmupdf-fa69ea8c236d5f58d6b158928a94ef527aa23457.tar.xz
Fix pdf_create_document.
In pdf_create_document set disallow_new_increments to 1. Without this, the calls to pdf_new_ref in pdf_create_document create an incremental xref section. The following call to pdf_set_populating_xref_trailer then does not set the trailer of the final xref section.
-rw-r--r--source/pdf/pdf-xref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 6fa4770f..29439926 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -2744,7 +2744,7 @@ pdf_document *pdf_create_document(fz_context *ctx)
doc->num_xref_sections = 0;
doc->num_incremental_sections = 0;
doc->xref_base = 0;
- doc->disallow_new_increments = 0;
+ doc->disallow_new_increments = 1;
pdf_get_populating_xref_entry(ctx, doc, 0);
trailer = pdf_new_dict(ctx, doc, 2);
pdf_dict_put_drop(ctx, trailer, PDF_NAME_Size, pdf_new_int(ctx, doc, 3));