t2p.h

Tue, 21 Jan 2003 18:30:49 +0000

author
eric
date
Tue, 21 Jan 2003 18:30:49 +0000
changeset 49
be20d7e8466f
parent 48
3d0be1c1c1b2
child 121
e50c7f76f2f6
permissions
-rw-r--r--

added command-line mode

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