1.1 diff -r d47b66e1722f -r 4b8c80d77f76 pdf.c 1.2 --- a/pdf.c Fri Mar 14 07:08:52 2003 +0000 1.3 +++ b/pdf.c Fri Mar 14 08:24:37 2003 +0000 1.4 @@ -2,7 +2,7 @@ 1.5 * tumble: build a PDF file from image files 1.6 * 1.7 * PDF routines 1.8 - * $Id: pdf.c,v 1.11 2003/03/13 03:44:34 eric Exp $ 1.9 + * $Id: pdf.c,v 1.12 2003/03/14 00:24:37 eric Exp $ 1.10 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> 1.11 * 1.12 * This program is free software; you can redistribute it and/or modify 1.13 @@ -121,9 +121,15 @@ 1.14 1.15 void pdf_close (pdf_file_handle pdf_file) 1.16 { 1.17 - /* finalize all data structures */ 1.18 + /* finalize trees, object numbers aren't allocated until this step */ 1.19 pdf_finalize_name_trees (pdf_file); 1.20 1.21 + /* add the page label number tree, if it exists, to the catalog */ 1.22 + if (pdf_file->page_label_tree) 1.23 + pdf_set_dict_entry (pdf_file->catalog, 1.24 + "PageLabels", 1.25 + pdf_file->page_label_tree->root->dict); 1.26 + 1.27 /* write body */ 1.28 pdf_write_all_ind_obj (pdf_file); 1.29