1 /*
2  * tumble: build a PDF file from image files
3  *
4  * PDF routines
5  * Copyright 2001, 2002, 2003, 2017 Eric Smith <spacewar@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.  Note that permission is
10  * not granted to redistribute this program under the terms of any
11  * other version of the General Public License.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
21  */
22 
23 
24 struct pdf_page
25 {
26   pdf_file_handle pdf_file;
27   struct pdf_obj *page_dict;
28   struct pdf_obj *media_box;
29   struct pdf_obj *procset;
30   struct pdf_obj *resources;
31 
32   char last_XObject_name;
33   struct pdf_obj *XObject_dict;
34 };
35 
36 
37 struct pdf_pages
38 {
39   struct pdf_obj *pages_dict;
40   struct pdf_obj *kids;
41   struct pdf_obj *count;
42 };
43 
44 
45 struct pdf_file
46 {
47   FILE                 *f;
48   struct pdf_obj       *first_ind_obj;
49   struct pdf_obj       *last_ind_obj;
50   long int              xref_offset;
51   struct pdf_obj       *catalog;
52   struct pdf_obj       *info;
53   struct pdf_pages     *root;
54   struct pdf_bookmark  *outline_root;
55   struct pdf_obj       *trailer_dict;
56   struct pdf_name_tree *page_label_tree;
57   struct pdf_name_tree *name_tree_list;
58 };
59