1 /*
2  * tumble: build a PDF file from image files
3  *
4  * Copyright 2001, 2002, 2003, 2017 Eric Smith <spacewar@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.  Note that permission is
9  * not granted to redistribute this program under the terms of any
10  * other version of the General Public License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
20  *
21  *  2009-03-02 [JDB] Add support for overlay images and color key masking.
22  */
23 
24 
25 extern int verbose;
26 
27 
28 typedef struct
29 {
30   bool has_resolution;
31   double x_resolution;
32   double y_resolution;
33 
34   bool has_page_size;
35   page_size_t page_size;
36 
37   bool has_rotation;
38   int rotation;
39 
40   bool has_crop;
41   crop_t crop;
42 
43   rgb_range_t *transparency;
44 
45   colormap_t *colormap;		// really an output attribute, but we don't have such a thing
46 
47 } input_attributes_t;
48 
49 
50 bool open_input_file (char *name);
51 bool close_input_file (void);
52 
53 
54 typedef struct
55 {
56   char *author;
57   char *creator;
58   char *title;
59   char *subject;
60   char *keywords;
61 } pdf_file_attributes_t;
62 
63 bool open_pdf_output_file (char *name,
64 			   pdf_file_attributes_t *attributes);
65 
66 
67 bool process_page (int image,  /* range 1 .. n */
68 		   input_attributes_t input_attributes,
69 		   bookmark_t *bookmarks,
70 		   page_label_t *page_label,
71 		   overlay_t *overlay,
72 		   rgb_range_t *transparency);
73