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