Thu, 13 Mar 2003 08:57:05 +0000
changed program name from t2p to tumble.
eric@49 | 1 | /* |
eric@125 | 2 | * tumble: build a PDF file from image files |
eric@49 | 3 | * |
eric@125 | 4 | * $Id: tumble.h,v 1.13 2003/03/13 00:57:05 eric Exp $ |
eric@49 | 5 | * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com> |
eric@49 | 6 | * |
eric@49 | 7 | * This program is free software; you can redistribute it and/or modify |
eric@49 | 8 | * it under the terms of the GNU General Public License version 2 as |
eric@49 | 9 | * published by the Free Software Foundation. Note that permission is |
eric@49 | 10 | * not granted to redistribute this program under the terms of any |
eric@49 | 11 | * other version of the General Public License. |
eric@49 | 12 | * |
eric@49 | 13 | * This program is distributed in the hope that it will be useful, |
eric@49 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
eric@49 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
eric@49 | 16 | * GNU General Public License for more details. |
eric@49 | 17 | * |
eric@49 | 18 | * You should have received a copy of the GNU General Public License |
eric@49 | 19 | * along with this program; if not, write to the Free Software |
eric@49 | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA */ |
eric@49 | 21 | |
eric@49 | 22 | |
eric@49 | 23 | extern int verbose; |
eric@49 | 24 | |
eric@49 | 25 | |
eric@23 | 26 | typedef struct |
eric@23 | 27 | { |
eric@48 | 28 | bool has_resolution; |
eric@36 | 29 | double x_resolution; |
eric@36 | 30 | double y_resolution; |
eric@36 | 31 | |
eric@48 | 32 | bool has_page_size; |
eric@32 | 33 | page_size_t page_size; |
eric@32 | 34 | |
eric@48 | 35 | bool has_rotation; |
eric@23 | 36 | int rotation; |
eric@32 | 37 | |
eric@48 | 38 | bool has_crop; |
eric@23 | 39 | crop_t crop; |
eric@23 | 40 | } input_attributes_t; |
eric@23 | 41 | |
eric@48 | 42 | bool open_tiff_input_file (char *name); |
eric@48 | 43 | bool close_tiff_input_file (void); |
eric@10 | 44 | |
eric@30 | 45 | |
eric@30 | 46 | typedef struct |
eric@30 | 47 | { |
eric@30 | 48 | char *author; |
eric@30 | 49 | char *creator; |
eric@30 | 50 | char *title; |
eric@30 | 51 | char *subject; |
eric@30 | 52 | char *keywords; |
eric@121 | 53 | bool has_bookmarks; |
eric@30 | 54 | } pdf_file_attributes_t; |
eric@30 | 55 | |
eric@48 | 56 | bool open_pdf_output_file (char *name, |
eric@48 | 57 | pdf_file_attributes_t *attributes); |
eric@30 | 58 | |
eric@10 | 59 | |
eric@25 | 60 | void process_page_numbers (int page_index, |
eric@25 | 61 | int count, |
eric@25 | 62 | int base, |
eric@25 | 63 | page_label_t *page_label); |
eric@25 | 64 | |
eric@49 | 65 | |
eric@49 | 66 | |
eric@48 | 67 | bool process_page (int image, /* range 1 .. n */ |
eric@48 | 68 | input_attributes_t input_attributes, |
eric@48 | 69 | bookmark_t *bookmarks); |