| 1 |
/* |
| 2 |
Copyright 2010-2014 Han The Thanh, <[email protected]> |
| 3 |
|
| 4 |
This file is part of pdfTeX. |
| 5 |
|
| 6 |
pdfTeX is free software; you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation; either version 2 of the License, or |
| 9 |
(at your option) any later version. |
| 10 |
|
| 11 |
pdfTeX is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
GNU General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License along |
| 17 |
with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
*/ |
| 19 |
|
| 20 |
/* This file contains declarations used in C code (via ptexlib.h) as |
| 21 |
well as in pdftoepdf.cc (where we can not #include "ptexlib.h"). |
| 22 |
*/ |
| 23 |
|
| 24 |
#ifndef PDFTEX_COMMON_H |
| 25 |
# define PDFTEX_COMMON_H |
| 26 |
|
| 27 |
/* Declarations generated from pdftex.web are included in ptexlib.h via pdftexd.h, |
| 28 |
we repeat them here for pdftoepdf.cc and as consistency check. |
| 29 |
|
| 30 |
pdftexd.h - generated from pdftex.web */ |
| 31 |
#ifdef __cplusplus |
| 32 |
typedef unsigned char eightbits; |
| 33 |
#endif |
| 34 |
|
| 35 |
extern integer pdfboxspecmedia; |
| 36 |
extern integer pdfboxspeccrop; |
| 37 |
extern integer pdfboxspecbleed; |
| 38 |
extern integer pdfboxspectrim; |
| 39 |
extern integer pdfboxspecart; |
| 40 |
|
| 41 |
extern longinteger pdfstreamlength; |
| 42 |
extern integer pdfptr; |
| 43 |
extern integer poolptr; |
| 44 |
extern eightbits *pdfbuf; |
| 45 |
extern integer pdfbufsize; |
| 46 |
extern boolean pdfosmode; |
| 47 |
extern eightbits pdflastbyte; |
| 48 |
extern integer fixedinclusioncopyfont; |
| 49 |
extern integer pdfpagegroupval; |
| 50 |
|
| 51 |
/* pdftexcoerce.h - generated from pdftex.web */ |
| 52 |
extern integer pdfnewobjnum(void); |
| 53 |
extern void pdfbeginstream(void); |
| 54 |
extern void pdfendobj(void); |
| 55 |
extern void pdfendstream(void); |
| 56 |
extern void pdfflush(void); |
| 57 |
extern void zpdfosgetosbuf(integer); |
| 58 |
#define pdfosgetosbuf(s) zpdfosgetosbuf((integer) (s)) |
| 59 |
extern void zpdfbeginobj(integer, integer); |
| 60 |
#define pdfbeginobj(i, pdfoslevel) zpdfbeginobj((integer) (i), (integer) (pdfoslevel)) |
| 61 |
|
| 62 |
/* epdf.c */ |
| 63 |
#ifdef __cplusplus |
| 64 |
# define fd_entry struct fd_entry |
| 65 |
# define fm_entry struct fm_entry |
| 66 |
#endif |
| 67 |
extern void embed_whole_font(fd_entry *); |
| 68 |
extern fd_entry *epdf_create_fontdescriptor(fm_entry *, int); |
| 69 |
extern void epdf_free(void); |
| 70 |
extern void epdf_mark_glyphs(fd_entry *, char *); |
| 71 |
extern int get_fd_objnum(fd_entry *); |
| 72 |
extern int get_fn_objnum(fd_entry *); |
| 73 |
extern int is_subsetable(fm_entry *); |
| 74 |
|
| 75 |
/* macnames.c */ |
| 76 |
extern char notdef[]; |
| 77 |
|
| 78 |
/* mapfile.c */ |
| 79 |
extern fm_entry *lookup_fontmap(char *); |
| 80 |
#undef fd_entry |
| 81 |
#undef fm_entry |
| 82 |
|
| 83 |
/* pdftoepdf.cc */ |
| 84 |
extern void epdf_check_mem(void); |
| 85 |
extern void epdf_delete(void); |
| 86 |
extern int read_pdf_info(char *, char *, int, int, int, int, int); |
| 87 |
|
| 88 |
/* utils.c */ |
| 89 |
extern char *convertStringToPDFString(const char *in, int len); |
| 90 |
extern void pdf_newline(void); |
| 91 |
__attribute__ ((format(printf, 1, 2))) |
| 92 |
extern void pdf_printf(const char *, ...); |
| 93 |
extern void pdf_puts(const char *); |
| 94 |
__attribute__ ((noreturn, format(printf, 1, 2))) |
| 95 |
extern void pdftex_fail(const char *, ...); |
| 96 |
__attribute__ ((format(printf, 1, 2))) |
| 97 |
extern void pdftex_warn(const char *, ...); |
| 98 |
extern char *stripzeros(char *a); |
| 99 |
__attribute__ ((format(printf, 1, 2))) |
| 100 |
extern void tex_printf(const char *, ...); |
| 101 |
extern void write_epdf(void); |
| 102 |
|
| 103 |
/* writeenc.c */ |
| 104 |
extern void epdf_write_enc(char **, int); |
| 105 |
|
| 106 |
/* writeimg.c */ |
| 107 |
extern float epdf_width; |
| 108 |
extern float epdf_height; |
| 109 |
extern float epdf_orig_x; |
| 110 |
extern float epdf_orig_y; |
| 111 |
extern float epdf_rotate; |
| 112 |
extern int epdf_selected_page; |
| 113 |
extern int epdf_num_pages; |
| 114 |
extern int epdf_page_box; |
| 115 |
extern void *epdf_doc; |
| 116 |
extern int epdf_has_page_group; |
| 117 |
|
| 118 |
#endif /* PDFTEX_COMMON_H */ |