Haru Free PDF Library
hpdf_doc.h
Go to the documentation of this file.
1 /*
2  * << Haru Free PDF Library >> -- hpdf_doc.h
3  *
4  * URL: http://libharu.org
5  *
6  * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
7  * Copyright (c) 2007-2009 Antony Dovgal <tony@daylessday.org>
8  *
9  * Permission to use, copy, modify, distribute and sell this software
10  * and its documentation for any purpose is hereby granted without fee,
11  * provided that the above copyright notice appear in all copies and
12  * that both that copyright notice and this permission notice appear
13  * in supporting documentation.
14  * It is provided "as is" without express or implied warranty.
15  *
16  */
17 
18 
19 #ifndef _HPDF_DOC_H
20 #define _HPDF_DOC_H
21 
22 #define HPDF_SIG_BYTES 0x41504446L
23 
24 #include "hpdf_catalog.h"
25 #include "hpdf_image.h"
26 #include "hpdf_pages.h"
27 #include "hpdf_outline.h"
28 #include "hpdf_ext_gstate.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #define HPDF_VER_DEFAULT HPDF_VER_12
35 
36 typedef struct _HPDF_Doc_Rec {
39 
51 
54 
55  /* list for loaded fontdefs */
57 
58  /* list for loaded encodings */
60 
62 
63  /* default compression mode */
65 
68 
70 
73 
74  /* buffer for saving into memory stream */
77 
78 typedef struct _HPDF_Doc_Rec *HPDF_Doc;
79 
80 
83  const char *encoding_name);
84 
85 
88  const char *font_name);
89 
90 
93  const char *font_name,
94  const char *encoding_name);
95 
96 
99 
100 
101 /*----- page handling -------------------------------------------------------*/
102 
105 
106 
109  HPDF_Pages parent);
110 
111 
114  HPDF_Pages pages);
115 
116 
119  HPDF_Page page);
120 
121 
122 
123 
124 /*----- font handling -------------------------------------------------------*/
125 
128  const char *font_name);
129 
130 
133  HPDF_FontDef fontdef);
134 
135 
136 /*----- encoding handling ---------------------------------------------------*/
137 
140  HPDF_Encoder encoder);
141 
142 
143 
144 /*----- encryptio------------------------------------------------------------*/
145 
148 
149 
152 
153 
156 
157 #ifdef __cplusplus
158 }
159 #endif /* __cplusplus */
160 
161 #endif /* _HPDF_DOC_H */
162 
struct _HPDF_Doc_Rec HPDF_Doc_Rec
struct _HPDF_Doc_Rec * HPDF_Doc
Definition: hpdf_doc.h:78
HPDF_BOOL HPDF_Doc_Validate(HPDF_Doc pdf)
HPDF_STATUS HPDF_Doc_RegisterFontDef(HPDF_Doc pdf, HPDF_FontDef fontdef)
HPDF_FontDef HPDF_GetFontDef(HPDF_Doc pdf, const char *font_name)
HPDF_Pages HPDF_Doc_GetCurrentPages(HPDF_Doc pdf)
HPDF_Encoder HPDF_Doc_FindEncoder(HPDF_Doc pdf, const char *encoding_name)
HPDF_FontDef HPDF_Doc_FindFontDef(HPDF_Doc pdf, const char *font_name)
HPDF_Font HPDF_Doc_FindFont(HPDF_Doc pdf, const char *font_name, const char *encoding_name)
HPDF_STATUS HPDF_Doc_SetCurrentPages(HPDF_Doc pdf, HPDF_Pages pages)
HPDF_STATUS HPDF_Doc_SetEncryptOff(HPDF_Doc pdf)
HPDF_Pages HPDF_Doc_AddPagesTo(HPDF_Doc pdf, HPDF_Pages parent)
HPDF_STATUS HPDF_Doc_SetCurrentPage(HPDF_Doc pdf, HPDF_Page page)
HPDF_STATUS HPDF_Doc_PrepareEncryption(HPDF_Doc pdf)
HPDF_STATUS HPDF_Doc_SetEncryptOn(HPDF_Doc pdf)
HPDF_STATUS HPDF_Doc_RegisterEncoder(HPDF_Doc pdf, HPDF_Encoder encoder)
signed int HPDF_BOOL
Definition: hpdf_types.h:89
unsigned int HPDF_UINT
Definition: hpdf_types.h:45
unsigned int HPDF_UINT32
Definition: hpdf_types.h:57
enum _HPDF_PdfVer HPDF_PDFVer
unsigned char HPDF_BYTE
Definition: hpdf_types.h:74
unsigned long HPDF_STATUS
Definition: hpdf_types.h:94
Definition: hpdf_objects.h:421
Definition: hpdf_doc.h:36
HPDF_UINT32 sig_bytes
Definition: hpdf_doc.h:37
HPDF_MMgr mmgr
Definition: hpdf_doc.h:40
HPDF_List encoder_list
Definition: hpdf_doc.h:59
HPDF_List fontdef_list
Definition: hpdf_doc.h:56
HPDF_Encoder def_encoder
Definition: hpdf_doc.h:69
HPDF_BYTE ttfont_tag[6]
Definition: hpdf_doc.h:53
HPDF_BOOL compression_mode
Definition: hpdf_doc.h:64
HPDF_Encoder cur_encoder
Definition: hpdf_doc.h:61
HPDF_Stream stream
Definition: hpdf_doc.h:75
HPDF_Pages root_pages
Definition: hpdf_doc.h:44
HPDF_Dict info
Definition: hpdf_doc.h:49
HPDF_Page cur_page
Definition: hpdf_doc.h:46
HPDF_List page_list
Definition: hpdf_doc.h:47
HPDF_BOOL encrypt_on
Definition: hpdf_doc.h:66
HPDF_EncryptDict encrypt_dict
Definition: hpdf_doc.h:67
HPDF_Pages cur_pages
Definition: hpdf_doc.h:45
HPDF_Xref xref
Definition: hpdf_doc.h:43
HPDF_Catalog catalog
Definition: hpdf_doc.h:41
HPDF_UINT page_per_pages
Definition: hpdf_doc.h:71
HPDF_Dict trailer
Definition: hpdf_doc.h:50
HPDF_PDFVer pdf_version
Definition: hpdf_doc.h:38
HPDF_Error_Rec error
Definition: hpdf_doc.h:48
HPDF_List font_mgr
Definition: hpdf_doc.h:52
HPDF_UINT cur_page_num
Definition: hpdf_doc.h:72
HPDF_Outline outlines
Definition: hpdf_doc.h:42
Definition: hpdf_encoder.h:115
Definition: hpdf_error.h:180
Definition: hpdf_fontdef.h:87
Definition: hpdf_list.h:30
Definition: hpdf_mmgr.h:40
Definition: hpdf_streams.h:99
Definition: hpdf_objects.h:542