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