hpdf 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/History +57 -0
  2. data/License +25 -0
  3. data/README +165 -0
  4. data/examples/arc_demo.rb +82 -0
  5. data/examples/demo.rb +92 -0
  6. data/examples/encryption.rb +41 -0
  7. data/examples/ext_gstater_demo.rb +171 -0
  8. data/examples/font_demo.rb +67 -0
  9. data/examples/jpfont_demo.rb +122 -0
  10. data/examples/line_demo.rb +301 -0
  11. data/examples/slide_show_demo.rb +139 -0
  12. data/examples/text_demo2.rb +189 -0
  13. data/examples/ttfont_demo.rb +106 -0
  14. data/ext/extconf.rb +6 -0
  15. data/ext/hpdf.c +3779 -0
  16. data/ext/hpdf_annotation.c +415 -0
  17. data/ext/hpdf_array.c +344 -0
  18. data/ext/hpdf_binary.c +117 -0
  19. data/ext/hpdf_boolean.c +47 -0
  20. data/ext/hpdf_catalog.c +354 -0
  21. data/ext/hpdf_destination.c +339 -0
  22. data/ext/hpdf_dict.c +488 -0
  23. data/ext/hpdf_doc.c +2020 -0
  24. data/ext/hpdf_doc_png.c +137 -0
  25. data/ext/hpdf_encoder.c +2991 -0
  26. data/ext/hpdf_encoder_cns.c +36359 -0
  27. data/ext/hpdf_encoder_cnt.c +15307 -0
  28. data/ext/hpdf_encoder_jp.c +16125 -0
  29. data/ext/hpdf_encoder_kr.c +27978 -0
  30. data/ext/hpdf_encrypt.c +632 -0
  31. data/ext/hpdf_encryptdict.c +240 -0
  32. data/ext/hpdf_error.c +114 -0
  33. data/ext/hpdf_ext_gstate.c +150 -0
  34. data/ext/hpdf_font.c +229 -0
  35. data/ext/hpdf_font_cid.c +1030 -0
  36. data/ext/hpdf_font_tt.c +406 -0
  37. data/ext/hpdf_font_type1.c +391 -0
  38. data/ext/hpdf_fontdef.c +56 -0
  39. data/ext/hpdf_fontdef_base14.c +4506 -0
  40. data/ext/hpdf_fontdef_cid.c +194 -0
  41. data/ext/hpdf_fontdef_cns.c +471 -0
  42. data/ext/hpdf_fontdef_cnt.c +250 -0
  43. data/ext/hpdf_fontdef_jp.c +1904 -0
  44. data/ext/hpdf_fontdef_kr.c +1572 -0
  45. data/ext/hpdf_fontdef_tt.c +2230 -0
  46. data/ext/hpdf_fontdef_type1.c +524 -0
  47. data/ext/hpdf_gstate.c +119 -0
  48. data/ext/hpdf_image.c +568 -0
  49. data/ext/hpdf_image_png.c +424 -0
  50. data/ext/hpdf_info.c +164 -0
  51. data/ext/hpdf_list.c +333 -0
  52. data/ext/hpdf_mmgr.c +243 -0
  53. data/ext/hpdf_name.c +71 -0
  54. data/ext/hpdf_null.c +31 -0
  55. data/ext/hpdf_number.c +49 -0
  56. data/ext/hpdf_objects.c +172 -0
  57. data/ext/hpdf_outline.c +329 -0
  58. data/ext/hpdf_page_label.c +74 -0
  59. data/ext/hpdf_page_operator.c +2764 -0
  60. data/ext/hpdf_pages.c +1508 -0
  61. data/ext/hpdf_real.c +61 -0
  62. data/ext/hpdf_streams.c +1435 -0
  63. data/ext/hpdf_string.c +189 -0
  64. data/ext/hpdf_utils.c +438 -0
  65. data/ext/hpdf_xref.c +348 -0
  66. data/ext/include/hpdf.h +1227 -0
  67. data/ext/include/hpdf_annotation.h +74 -0
  68. data/ext/include/hpdf_catalog.h +81 -0
  69. data/ext/include/hpdf_conf.h +76 -0
  70. data/ext/include/hpdf_consts.h +549 -0
  71. data/ext/include/hpdf_destination.h +41 -0
  72. data/ext/include/hpdf_doc.h +159 -0
  73. data/ext/include/hpdf_encoder.h +311 -0
  74. data/ext/include/hpdf_encrypt.h +156 -0
  75. data/ext/include/hpdf_encryptdict.h +66 -0
  76. data/ext/include/hpdf_error.h +201 -0
  77. data/ext/include/hpdf_ext_gstate.h +38 -0
  78. data/ext/include/hpdf_font.h +112 -0
  79. data/ext/include/hpdf_fontdef.h +403 -0
  80. data/ext/include/hpdf_gstate.h +80 -0
  81. data/ext/include/hpdf_image.h +72 -0
  82. data/ext/include/hpdf_info.h +48 -0
  83. data/ext/include/hpdf_list.h +85 -0
  84. data/ext/include/hpdf_mmgr.h +82 -0
  85. data/ext/include/hpdf_objects.h +587 -0
  86. data/ext/include/hpdf_outline.h +74 -0
  87. data/ext/include/hpdf_page_label.h +35 -0
  88. data/ext/include/hpdf_pages.h +128 -0
  89. data/ext/include/hpdf_streams.h +276 -0
  90. data/ext/include/hpdf_types.h +488 -0
  91. data/ext/include/hpdf_utils.h +161 -0
  92. data/tests/arc_demo.rb +82 -0
  93. data/tests/demo.rb +91 -0
  94. data/tests/encryption.rb +41 -0
  95. data/tests/ext_gstater_demo.rb +171 -0
  96. data/tests/font_demo.rb +67 -0
  97. data/tests/line_demo.rb +301 -0
  98. data/tests/slide_show_demo.rb +139 -0
  99. data/tests/test_all_examples.rb +31 -0
  100. data/tests/text_demo2.rb +189 -0
  101. metadata +147 -0
@@ -0,0 +1,41 @@
1
+ /*
2
+ * << Haru Free PDF Library 2.0.0 >> -- hpdf_destination.c
3
+ *
4
+ * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
5
+ *
6
+ * Permission to use, copy, modify, distribute and sell this software
7
+ * and its documentation for any purpose is hereby granted without fee,
8
+ * provided that the above copyright notice appear in all copies and
9
+ * that both that copyright notice and this permission notice appear
10
+ * in supporting documentation.
11
+ * It is provided "as is" without express or implied warranty.
12
+ *
13
+ */
14
+
15
+ #ifndef _HPDF_DESTINATION_H
16
+ #define _HPDF_DESTINATION_H
17
+
18
+ #include "hpdf_objects.h"
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ /*----------------------------------------------------------------------------*/
25
+ /*----- HPDF_Destination -----------------------------------------------------*/
26
+
27
+ HPDF_Destination
28
+ HPDF_Destination_New (HPDF_MMgr mmgr,
29
+ HPDF_Page target,
30
+ HPDF_Xref xref);
31
+
32
+
33
+ HPDF_BOOL
34
+ HPDF_Destination_Validate (HPDF_Destination dst);
35
+
36
+ #ifdef __cplusplus
37
+ }
38
+ #endif /* __cplusplus */
39
+
40
+ #endif /* _HPDF_DESTINATION_H */
41
+
@@ -0,0 +1,159 @@
1
+ /*
2
+ * << Haru Free PDF Library 2.0.3 >> -- hpdf_doc.h
3
+ *
4
+ * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
5
+ *
6
+ * Permission to use, copy, modify, distribute and sell this software
7
+ * and its documentation for any purpose is hereby granted without fee,
8
+ * provided that the above copyright notice appear in all copies and
9
+ * that both that copyright notice and this permission notice appear
10
+ * in supporting documentation.
11
+ * It is provided "as is" without express or implied warranty.
12
+ *
13
+ */
14
+
15
+
16
+ #ifndef _HPDF_DOC_H
17
+ #define _HPDF_DOC_H
18
+
19
+ #define HPDF_SIG_BYTES 0x41504446L
20
+
21
+ #include "hpdf_catalog.h"
22
+ #include "hpdf_image.h"
23
+ #include "hpdf_pages.h"
24
+ #include "hpdf_outline.h"
25
+ #include "hpdf_ext_gstate.h"
26
+
27
+ #ifdef __cplusplus
28
+ extern "C" {
29
+ #endif
30
+
31
+ #define HPDF_VER_DEFAULT HPDF_VER_12
32
+
33
+ typedef struct _HPDF_Doc_Rec {
34
+ HPDF_UINT32 sig_bytes;
35
+ HPDF_PDFVer pdf_version;
36
+
37
+ HPDF_MMgr mmgr;
38
+ HPDF_Catalog catalog;
39
+ HPDF_Outline outlines;
40
+ HPDF_Xref xref;
41
+ HPDF_Pages root_pages;
42
+ HPDF_Pages cur_pages;
43
+ HPDF_Page cur_page;
44
+ HPDF_List page_list;
45
+ HPDF_Error_Rec error;
46
+ HPDF_Dict info;
47
+ HPDF_Dict trailer;
48
+
49
+ HPDF_List font_mgr;
50
+ HPDF_BYTE ttfont_tag[6];
51
+
52
+ /* list for loaded fontdefs */
53
+ HPDF_List fontdef_list;
54
+
55
+ /* list for loaded encodings */
56
+ HPDF_List encoder_list;
57
+
58
+ HPDF_Encoder cur_encoder;
59
+
60
+ /* default compression mode */
61
+ HPDF_BOOL compression_mode;
62
+
63
+ HPDF_BOOL encrypt_on;
64
+ HPDF_EncryptDict encrypt_dict;
65
+
66
+ HPDF_Encoder def_encoder;
67
+
68
+ HPDF_UINT page_per_pages;
69
+ HPDF_UINT cur_page_num;
70
+
71
+ /* buffer for saving into memory stream */
72
+ HPDF_Stream stream;
73
+ } HPDF_Doc_Rec;
74
+
75
+ typedef struct _HPDF_Doc_Rec *HPDF_Doc;
76
+
77
+
78
+ HPDF_Encoder
79
+ HPDF_Doc_FindEncoder (HPDF_Doc pdf,
80
+ const char *encoding_name);
81
+
82
+
83
+ HPDF_FontDef
84
+ HPDF_Doc_FindFontDef (HPDF_Doc pdf,
85
+ const char *font_name);
86
+
87
+
88
+ HPDF_Font
89
+ HPDF_Doc_FindFont (HPDF_Doc pdf,
90
+ const char *font_name,
91
+ const char *encoding_name);
92
+
93
+
94
+ HPDF_BOOL
95
+ HPDF_Doc_Validate (HPDF_Doc pdf);
96
+
97
+
98
+ /*----- page handling -------------------------------------------------------*/
99
+
100
+ HPDF_Pages
101
+ HPDF_Doc_GetCurrentPages (HPDF_Doc pdf);
102
+
103
+
104
+ HPDF_Pages
105
+ HPDF_Doc_AddPagesTo (HPDF_Doc pdf,
106
+ HPDF_Pages parent);
107
+
108
+
109
+ HPDF_STATUS
110
+ HPDF_Doc_SetCurrentPages (HPDF_Doc pdf,
111
+ HPDF_Pages pages);
112
+
113
+
114
+ HPDF_STATUS
115
+ HPDF_Doc_SetCurrentPage (HPDF_Doc pdf,
116
+ HPDF_Page page);
117
+
118
+
119
+
120
+
121
+ /*----- font handling -------------------------------------------------------*/
122
+
123
+ HPDF_FontDef
124
+ HPDF_GetFontDef (HPDF_Doc pdf,
125
+ const char *font_name);
126
+
127
+
128
+ HPDF_STATUS
129
+ HPDF_Doc_RegisterFontDef (HPDF_Doc pdf,
130
+ HPDF_FontDef fontdef);
131
+
132
+
133
+ /*----- encoding handling ---------------------------------------------------*/
134
+
135
+ HPDF_STATUS
136
+ HPDF_Doc_RegisterEncoder (HPDF_Doc pdf,
137
+ HPDF_Encoder encoder);
138
+
139
+
140
+
141
+ /*----- encryptio------------------------------------------------------------*/
142
+
143
+ HPDF_STATUS
144
+ HPDF_Doc_SetEncryptOn (HPDF_Doc pdf);
145
+
146
+
147
+ HPDF_STATUS
148
+ HPDF_Doc_SetEncryptOff (HPDF_Doc pdf);
149
+
150
+
151
+ HPDF_STATUS
152
+ HPDF_Doc_PrepareEncryption (HPDF_Doc pdf);
153
+
154
+ #ifdef __cplusplus
155
+ }
156
+ #endif /* __cplusplus */
157
+
158
+ #endif /* _HPDF_DOC_H */
159
+
@@ -0,0 +1,311 @@
1
+ /*
2
+ * << Haru Free PDF Library 2.0.2 >> -- hpdf_encoder.h
3
+ *
4
+ * URL http://libharu.sourceforge.net/
5
+ *
6
+ * Copyright (c) 1999-2006 Takeshi Kanno
7
+ *
8
+ * Permission to use, copy, modify, distribute and sell this software
9
+ * and its documentation for any purpose is hereby granted without fee,
10
+ * provided that the above copyright notice appear in all copies and
11
+ * that both that copyright notice and this permission notice appear
12
+ * in supporting documentation.
13
+ * It is provided "as is" without express or implied warranty.
14
+ *
15
+ */
16
+
17
+ #ifndef _HPDF_ENCODER_H
18
+ #define _HPDF_ENCODER_H
19
+
20
+ #include "hpdf_consts.h"
21
+ #include "hpdf_streams.h"
22
+
23
+ #ifdef __cplusplus
24
+ extern "C" {
25
+ #endif
26
+
27
+ /*-- HPDF_Encoder ---------------------------------------*/
28
+
29
+ #define HPDF_ENCODER_SIG_BYTES 0x454E4344L
30
+
31
+ /*----------------------------------------------------------------------------*/
32
+ /*------ predefined font encodings -------------------------------------------*/
33
+
34
+ #define HPDF_ENCODING_FONT_SPECIFIC "FontSpecific"
35
+ #define HPDF_ENCODING_STANDARD "StandardEncoding"
36
+ #define HPDF_ENCODING_MAC_ROMAN "MacRomanEncoding"
37
+ #define HPDF_ENCODING_WIN_ANSI "WinAnsiEncoding"
38
+ #define HPDF_ENCODING_ISO8859_2 "ISO8859-2"
39
+ #define HPDF_ENCODING_ISO8859_3 "ISO8859-3"
40
+ #define HPDF_ENCODING_ISO8859_4 "ISO8859-4"
41
+ #define HPDF_ENCODING_ISO8859_5 "ISO8859-5"
42
+ #define HPDF_ENCODING_ISO8859_6 "ISO8859-6"
43
+ #define HPDF_ENCODING_ISO8859_7 "ISO8859-7"
44
+ #define HPDF_ENCODING_ISO8859_8 "ISO8859-8"
45
+ #define HPDF_ENCODING_ISO8859_9 "ISO8859-9"
46
+ #define HPDF_ENCODING_ISO8859_10 "ISO8859-10"
47
+ #define HPDF_ENCODING_ISO8859_11 "ISO8859-11"
48
+ #define HPDF_ENCODING_ISO8859_13 "ISO8859-13"
49
+ #define HPDF_ENCODING_ISO8859_14 "ISO8859-14"
50
+ #define HPDF_ENCODING_ISO8859_15 "ISO8859-15"
51
+ #define HPDF_ENCODING_ISO8859_16 "ISO8859-16"
52
+ #define HPDF_ENCODING_CP1250 "CP1250"
53
+ #define HPDF_ENCODING_CP1251 "CP1251"
54
+ #define HPDF_ENCODING_CP1252 "CP1252"
55
+ #define HPDF_ENCODING_CP1253 "CP1253"
56
+ #define HPDF_ENCODING_CP1254 "CP1254"
57
+ #define HPDF_ENCODING_CP1255 "CP1255"
58
+ #define HPDF_ENCODING_CP1256 "CP1256"
59
+ #define HPDF_ENCODING_CP1257 "CP1257"
60
+ #define HPDF_ENCODING_CP1258 "CP1258"
61
+ #define HPDF_ENCODING_KOI8_R "KOI8-R"
62
+
63
+ /*----------------------------------------------------------------------------*/
64
+ /*----- definition for font encoding -----------------------------------------*/
65
+
66
+ #define char_NOTDEF ".notdef"
67
+
68
+ typedef enum _HPDF_EncodingType {
69
+ HPDF_STANDARD_ENCODING = 0,
70
+ HPDF_MAC_ROMAN_ENCODING,
71
+ HPDF_WIN_ANSI_ENCODING,
72
+ HPDF_FONT_SPECIFIC,
73
+ HPDF_ENCODING_EOF
74
+ } HPDF_EncodingType;
75
+
76
+
77
+ typedef struct _HPDF_ParseText_Rec {
78
+ const HPDF_BYTE *text;
79
+ HPDF_UINT index;
80
+ HPDF_UINT len;
81
+ HPDF_ByteType byte_type;
82
+ } HPDF_ParseText_Rec;
83
+
84
+
85
+ typedef struct _HPDF_Encoder_Rec *HPDF_Encoder;
86
+
87
+ typedef HPDF_ByteType
88
+ (*HPDF_Encoder_ByteType_Func) (HPDF_Encoder encoder,
89
+ HPDF_ParseText_Rec *state);
90
+
91
+ typedef HPDF_UNICODE
92
+ (*HPDF_Encoder_ToUnicode_Func) (HPDF_Encoder encoder,
93
+ HPDF_UINT16 code);
94
+
95
+
96
+ typedef HPDF_STATUS
97
+ (*HPDF_Encoder_Write_Func) (HPDF_Encoder encoder,
98
+ HPDF_Stream out);
99
+
100
+
101
+ typedef HPDF_STATUS
102
+ (*HPDF_Encoder_Init_Func) (HPDF_Encoder encoder);
103
+
104
+
105
+ typedef void
106
+ (*HPDF_Encoder_Free_Func) (HPDF_Encoder encoder);
107
+
108
+
109
+ typedef struct _HPDF_Encoder_Rec {
110
+ HPDF_UINT32 sig_bytes;
111
+ char name[HPDF_LIMIT_MAX_NAME_LEN + 1];
112
+ HPDF_MMgr mmgr;
113
+ HPDF_Error error;
114
+ HPDF_EncoderType type;
115
+
116
+ HPDF_Encoder_ByteType_Func byte_type_fn;
117
+ HPDF_Encoder_ToUnicode_Func to_unicode_fn;
118
+ HPDF_Encoder_Write_Func write_fn;
119
+ HPDF_Encoder_Free_Func free_fn;
120
+ HPDF_Encoder_Init_Func init_fn;
121
+ /*
122
+ char lang_code[3];
123
+ char country_code[3];
124
+ */
125
+ void *attr;
126
+ } HPDF_Encoder_Rec;
127
+
128
+
129
+ typedef enum _HPDF_BaseEncodings {
130
+ HPDF_BASE_ENCODING_STANDARD,
131
+ HPDF_BASE_ENCODING_WIN_ANSI,
132
+ HPDF_BASE_ENCODING_MAC_ROMAN,
133
+ HPDF_BASE_ENCODING_FONT_SPECIFIC,
134
+ HPDF_BASE_ENCODING_EOF
135
+ } HPDF_BaseEncodings;
136
+
137
+ HPDF_STATUS
138
+ HPDF_Encoder_Validate (HPDF_Encoder encoder);
139
+
140
+ void
141
+ HPDF_Encoder_SetParseText (HPDF_Encoder encoder,
142
+ HPDF_ParseText_Rec *state,
143
+ const HPDF_BYTE *text,
144
+ HPDF_UINT len);
145
+
146
+ HPDF_ByteType
147
+ HPDF_Encoder_ByteType (HPDF_Encoder encoder,
148
+ HPDF_ParseText_Rec *state);
149
+
150
+
151
+
152
+ HPDF_UNICODE
153
+ HPDF_Encoder_ToUnicode (HPDF_Encoder encoder,
154
+ HPDF_UINT16 code);
155
+
156
+
157
+ void
158
+ HPDF_Encoder_Free (HPDF_Encoder encoder);
159
+
160
+ /*-- HPDF_BasicEncoder ----------------------------------*/
161
+
162
+
163
+ typedef struct _HPDF_BasicEncoderAttr_Rec *HPDF_BasicEncoderAttr;
164
+
165
+ typedef struct _HPDF_BasicEncoderAttr_Rec {
166
+ char base_encoding[HPDF_LIMIT_MAX_NAME_LEN + 1];
167
+ HPDF_BYTE first_char;
168
+ HPDF_BYTE last_char;
169
+ HPDF_UNICODE unicode_map[256];
170
+ HPDF_BOOL has_differences;
171
+ HPDF_BYTE differences[256];
172
+ } HPDF_BasicEncoderAttr_Rec;
173
+
174
+
175
+ HPDF_Encoder
176
+ HPDF_BasicEncoder_New (HPDF_MMgr mmgr,
177
+ const char *encoding_name);
178
+
179
+
180
+ void
181
+ HPDF_BasicEncoder_Free (HPDF_Encoder encoder);
182
+
183
+
184
+ HPDF_STATUS
185
+ HPDF_BasicEncoder_Write (HPDF_Encoder encoder,
186
+ HPDF_Stream out);
187
+
188
+
189
+ HPDF_UNICODE
190
+ HPDF_BasicEncoder_ToUnicode (HPDF_Encoder encoder,
191
+ HPDF_UINT16 code);
192
+
193
+ /*-- HPDF_CMapEncoder ----------------------------------*/
194
+
195
+ typedef HPDF_BOOL
196
+ (*HPDF_CMapEncoder_ByteType_Func) (HPDF_Encoder encoder,
197
+ HPDF_BYTE b);
198
+
199
+ typedef struct _HPDF_CidRange_Rec {
200
+ HPDF_UINT16 from;
201
+ HPDF_UINT16 to;
202
+ HPDF_UINT16 cid;
203
+ } HPDF_CidRange_Rec;
204
+
205
+
206
+ typedef struct _HPDF_UnicodeMap_Rec {
207
+ HPDF_UINT16 code;
208
+ HPDF_UINT16 unicode;
209
+ } HPDF_UnicodeMap_Rec;
210
+
211
+ typedef struct _HPDF_CMapEncoderAttr_Rec *HPDF_CMapEncoderAttr;
212
+
213
+ typedef struct _HPDF_CMapEncoderAttr_Rec {
214
+ HPDF_UNICODE unicode_map[256][256];
215
+ HPDF_UINT16 cid_map[256][256];
216
+ HPDF_UINT16 jww_line_head[HPDF_MAX_JWW_NUM];
217
+ HPDF_List cmap_range;
218
+ HPDF_List notdef_range;
219
+ HPDF_List code_space_range;
220
+ HPDF_WritingMode writing_mode;
221
+ char registry[HPDF_LIMIT_MAX_NAME_LEN + 1];
222
+ char ordering[HPDF_LIMIT_MAX_NAME_LEN + 1];
223
+ HPDF_INT suppliment;
224
+ HPDF_CMapEncoder_ByteType_Func is_lead_byte_fn;
225
+ HPDF_CMapEncoder_ByteType_Func is_trial_byte_fn;
226
+ HPDF_INT uid_offset;
227
+ HPDF_UINT xuid[3];
228
+ } HPDF_CMapEncoderAttr_Rec;
229
+
230
+
231
+ HPDF_Encoder
232
+ HPDF_CMapEncoder_New (HPDF_MMgr mmgr,
233
+ char *name,
234
+ HPDF_Encoder_Init_Func init_fn);
235
+
236
+
237
+ HPDF_STATUS
238
+ HPDF_CMapEncoder_InitAttr (HPDF_Encoder encoder);
239
+
240
+
241
+ void
242
+ HPDF_CMapEncoder_Free (HPDF_Encoder encoder);
243
+
244
+
245
+ HPDF_STATUS
246
+ HPDF_CMapEncoder_Write (HPDF_Encoder encoder,
247
+ HPDF_Stream out);
248
+
249
+
250
+ HPDF_UNICODE
251
+ HPDF_CMapEncoder_ToUnicode (HPDF_Encoder encoder,
252
+ HPDF_UINT16 code);
253
+
254
+ HPDF_UINT16
255
+ HPDF_CMapEncoder_ToCID (HPDF_Encoder encoder,
256
+ HPDF_UINT16 code);
257
+
258
+ HPDF_STATUS
259
+ HPDF_CMapEncoder_SetParseText (HPDF_Encoder encoder,
260
+ HPDF_ParseText_Rec *state,
261
+ const HPDF_BYTE *text,
262
+ HPDF_UINT len);
263
+
264
+ HPDF_ByteType
265
+ HPDF_CMapEncoder_ByteType (HPDF_Encoder encoder,
266
+ HPDF_ParseText_Rec *state);
267
+
268
+
269
+ HPDF_STATUS
270
+ HPDF_CMapEncoder_AddCMap (HPDF_Encoder encoder,
271
+ const HPDF_CidRange_Rec *range);
272
+
273
+
274
+ HPDF_STATUS
275
+ HPDF_CMapEncoder_AddNotDefRange (HPDF_Encoder encoder,
276
+ HPDF_CidRange_Rec range);
277
+
278
+
279
+ HPDF_STATUS
280
+ HPDF_CMapEncoder_AddCodeSpaceRange (HPDF_Encoder encoder,
281
+ HPDF_CidRange_Rec range);
282
+
283
+
284
+ void
285
+ HPDF_CMapEncoder_SetUnicodeArray (HPDF_Encoder encoder,
286
+ const HPDF_UnicodeMap_Rec *array1);
287
+
288
+
289
+ HPDF_STATUS
290
+ HPDF_CMapEncoder_AddJWWLineHead (HPDF_Encoder encoder,
291
+ const HPDF_UINT16 *code);
292
+
293
+ HPDF_BOOL
294
+ HPDF_Encoder_CheckJWWLineHead (HPDF_Encoder encoder,
295
+ const HPDF_UINT16 code);
296
+
297
+ /*-- utility functions ----------------------------------*/
298
+
299
+ const char*
300
+ HPDF_UnicodeToGryphName (HPDF_UNICODE unicode);
301
+
302
+
303
+ HPDF_UNICODE
304
+ HPDF_GryphNameToUnicode (const char *gryph_name);
305
+
306
+ #ifdef __cplusplus
307
+ }
308
+ #endif /* __cplusplus */
309
+
310
+ #endif /* _HPDF_ENCODER_H */
311
+