From fa69ea8c236d5f58d6b158928a94ef527aa23457 Mon Sep 17 00:00:00 2001 From: Simon Reinhardt Date: Thu, 8 Oct 2015 09:49:27 +0200 Subject: 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. --- source/pdf/pdf-xref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') 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)); -- cgit v1.2.3