summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-xref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 29439926..f65edefc 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 = 1;
+ doc->disallow_new_increments = 0;
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));
@@ -2760,8 +2760,8 @@ pdf_document *pdf_create_document(fz_context *ctx)
pdf_dict_put_drop(ctx, pages, PDF_NAME_Type, PDF_NAME_Pages);
pdf_dict_put_drop(ctx, pages, PDF_NAME_Count, pdf_new_int(ctx, doc, 0));
pdf_dict_put_drop(ctx, pages, PDF_NAME_Kids, pdf_new_array(ctx, doc, 1));
- pdf_set_populating_xref_trailer(ctx, doc, trailer);
- pdf_drop_obj(ctx, trailer);
+ /* Set the trailer of the final xref section. */
+ doc->xref_sections[0].trailer = trailer;
}
fz_catch(ctx)
{