pdf.h

Fri, 21 Feb 2003 09:25:47 +0000

author
eric
date
Fri, 21 Feb 2003 09:25:47 +0000
changeset 66
6e0551b59dba
parent 64
151394412eba
child 74
12bc5088172e
permissions
-rw-r--r--

implemented ImageMask fill color arguments to pdf_write_g4_fax_image().

eric@62 1 /*
eric@62 2 * t2p: Create a PDF file from the contents of one or more TIFF
eric@62 3 * bilevel image files. The images in the resulting PDF file
eric@62 4 * will be compressed using ITU-T T.6 (G4) fax encoding.
eric@62 5 *
eric@62 6 * PDF routines
eric@66 7 * $Id: pdf.h,v 1.4 2003/02/21 01:25:47 eric Exp $
eric@62 8 * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
eric@62 9 *
eric@62 10 * This program is free software; you can redistribute it and/or modify
eric@62 11 * it under the terms of the GNU General Public License version 2 as
eric@62 12 * published by the Free Software Foundation. Note that permission is
eric@62 13 * not granted to redistribute this program under the terms of any
eric@62 14 * other version of the General Public License.
eric@62 15 *
eric@62 16 * This program is distributed in the hope that it will be useful,
eric@62 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
eric@62 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
eric@62 19 * GNU General Public License for more details.
eric@62 20 *
eric@62 21 * You should have received a copy of the GNU General Public License
eric@62 22 * along with this program; if not, write to the Free Software
eric@62 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
eric@62 24 */
eric@62 25
eric@62 26
eric@59 27 typedef struct pdf_file *pdf_file_handle;
eric@59 28
eric@59 29 typedef struct pdf_page *pdf_page_handle;
eric@59 30
eric@59 31
eric@59 32 void pdf_init (void);
eric@59 33
eric@59 34 pdf_file_handle pdf_create (char *filename);
eric@59 35
eric@59 36 void pdf_close (pdf_file_handle pdf_file);
eric@59 37
eric@59 38 void pdf_set_author (pdf_file_handle pdf_file, char *author);
eric@59 39 void pdf_set_creator (pdf_file_handle pdf_file, char *author);
eric@59 40 void pdf_set_title (pdf_file_handle pdf_file, char *author);
eric@59 41 void pdf_set_subject (pdf_file_handle pdf_file, char *author);
eric@59 42 void pdf_set_keywords (pdf_file_handle pdf_file, char *author);
eric@59 43
eric@59 44
eric@59 45 /* width and height in units of 1/72 inch */
eric@59 46 pdf_page_handle pdf_new_page (pdf_file_handle pdf_file,
eric@59 47 double width,
eric@59 48 double height);
eric@59 49
eric@59 50 void pdf_close_page (pdf_page_handle pdf_page);
eric@59 51
eric@59 52
eric@59 53 /* The length of the data must be Rows * rowbytes.
eric@59 54 Note that rowbytes must be at least (Columns+7)/8, but may be arbitrarily
eric@59 55 large. */
eric@59 56 void pdf_write_g4_fax_image (pdf_page_handle pdf_page,
eric@64 57 double x,
eric@64 58 double y,
eric@64 59 double width,
eric@64 60 double height,
eric@62 61 Bitmap *bitmap,
eric@66 62 bool ImageMask,
eric@66 63 double r, /* RGB fill color, only for ImageMask */
eric@66 64 double g,
eric@66 65 double b,
eric@66 66 bool BlackIs1); /* boolean, typ. false */
eric@59 67
eric@59 68
eric@59 69 void pdf_set_page_number (pdf_page_handle pdf_page, char *page_number);
eric@59 70
eric@59 71 void pdf_bookmark (pdf_page_handle pdf_page, int level, char *name);
eric@59 72
eric@59 73 void pdf_insert_tiff_image (pdf_page_handle pdf_page, char *filename);