hpdf 2.0.8-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/History +57 -0
  2. data/License +25 -0
  3. data/README +136 -0
  4. data/docs/annotation_handling.html +503 -0
  5. data/docs/api.css +115 -0
  6. data/docs/api_reference.html +112 -0
  7. data/docs/bindings.html +242 -0
  8. data/docs/compile_your_program.html +365 -0
  9. data/docs/default.css +115 -0
  10. data/docs/destination_handling.html +620 -0
  11. data/docs/document_handling.html +4751 -0
  12. data/docs/documentation.html +110 -0
  13. data/docs/encoder_handling.html +428 -0
  14. data/docs/error_handling.html +1609 -0
  15. data/docs/examples.html +702 -0
  16. data/docs/ext_gstate.html +407 -0
  17. data/docs/font_handling.html +669 -0
  18. data/docs/fonts.html +978 -0
  19. data/docs/graphics.html +1210 -0
  20. data/docs/handles.html +204 -0
  21. data/docs/how_to_use.html +371 -0
  22. data/docs/image/Thumbs.db +0 -0
  23. data/docs/image/character_map.png +0 -0
  24. data/docs/image/encoding_list.png +0 -0
  25. data/docs/image/extgtate.png +0 -0
  26. data/docs/image/figure1.png +0 -0
  27. data/docs/image/figure10.png +0 -0
  28. data/docs/image/figure11.png +0 -0
  29. data/docs/image/figure12.png +0 -0
  30. data/docs/image/figure13.png +0 -0
  31. data/docs/image/figure14.png +0 -0
  32. data/docs/image/figure15.png +0 -0
  33. data/docs/image/figure16.png +0 -0
  34. data/docs/image/figure17.png +0 -0
  35. data/docs/image/figure18.png +0 -0
  36. data/docs/image/figure19.png +0 -0
  37. data/docs/image/figure2.png +0 -0
  38. data/docs/image/figure20.png +0 -0
  39. data/docs/image/figure21.png +0 -0
  40. data/docs/image/figure22.png +0 -0
  41. data/docs/image/figure23.png +0 -0
  42. data/docs/image/figure24.png +0 -0
  43. data/docs/image/figure25.png +0 -0
  44. data/docs/image/figure26.png +0 -0
  45. data/docs/image/figure27.png +0 -0
  46. data/docs/image/figure28.png +0 -0
  47. data/docs/image/figure3.png +0 -0
  48. data/docs/image/figure4.png +0 -0
  49. data/docs/image/figure5.png +0 -0
  50. data/docs/image/figure6.png +0 -0
  51. data/docs/image/figure7.png +0 -0
  52. data/docs/image/figure8.png +0 -0
  53. data/docs/image/figure9.png +0 -0
  54. data/docs/image/font_demo.png +0 -0
  55. data/docs/image/harulogo.png +0 -0
  56. data/docs/image/image_demo.png +0 -0
  57. data/docs/image/jpfont_demo.png +0 -0
  58. data/docs/image/line_demo.png +0 -0
  59. data/docs/image/png_demo.png +0 -0
  60. data/docs/image/text_annot.png +0 -0
  61. data/docs/image/text_demo.png +0 -0
  62. data/docs/image/text_demo2.png +0 -0
  63. data/docs/image/tt_font.png +0 -0
  64. data/docs/image_handling.html +505 -0
  65. data/docs/index.html +305 -0
  66. data/docs/install.html +243 -0
  67. data/docs/outline_handling.html +229 -0
  68. data/docs/page_handling.html +2647 -0
  69. data/docs/page_operator.html +2640 -0
  70. data/docs/useful_links.html +203 -0
  71. data/examples/arc_demo.rb +82 -0
  72. data/examples/demo.rb +91 -0
  73. data/examples/encryption.rb +41 -0
  74. data/examples/ext_gstater_demo.rb +171 -0
  75. data/examples/font_demo.rb +67 -0
  76. data/examples/jpfont_demo.rb +122 -0
  77. data/examples/line_demo.rb +301 -0
  78. data/examples/slide_show_demo.rb +139 -0
  79. data/examples/text_demo2.rb +189 -0
  80. data/examples/ttfont_demo.rb +106 -0
  81. data/lib/hpdf.so +0 -0
  82. data/tests/arc_demo.rb +82 -0
  83. data/tests/demo.rb +91 -0
  84. data/tests/encryption.rb +41 -0
  85. data/tests/ext_gstater_demo.rb +171 -0
  86. data/tests/font_demo.rb +67 -0
  87. data/tests/line_demo.rb +301 -0
  88. data/tests/slide_show_demo.rb +139 -0
  89. data/tests/test_all_examples.rb +31 -0
  90. data/tests/text_demo2.rb +189 -0
  91. metadata +137 -0
@@ -0,0 +1,407 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
2
+ <html lang="en">
3
+ <head>
4
+ <title>Haru Free PDF Library</title>
5
+ <meta http-equiv="Content-Type"
6
+ content="text/html; charset=iso-8859-1">
7
+ <link href="api.css" type="text/css" rel="stylesheet">
8
+ </head>
9
+ <body>
10
+ <div id="headcontainer">
11
+ <div class="head"><img alt="Haru Free PDF Library"
12
+ src="image/harulogo.png" style="width: 413px; height: 40px;"></div>
13
+ </div>
14
+ <div id="barcontainer">
15
+ <div class="buildbar"><a href="index.html">home</a> | <a
16
+ href="http://sourceforge.net/project/showfiles.php?group_id=83044">download</a>
17
+ |
18
+ <a href="documentation.html">documentation</a> | <a
19
+ href="examples.html">examples </a>| <a
20
+ href="http://sourceforge.net/projects/libharu/">sourceforge</a> |
21
+ <a href="http://sourceforge.net/forum/?group_id=83044">forums</a><br>
22
+ </div>
23
+ </div>
24
+ <div id="container">
25
+ <div id="mainpage">
26
+ <div id="ccol">
27
+ <h2>ExtGState<br>
28
+ </h2>
29
+ <h3><a name="HPDF_ExtGState_SetAlphaStroke_"></a>HPDF_ExtGState_SetAlphaStroke<br>
30
+ </h3>
31
+ <div class="bodytext1">
32
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
33
+ "apdf.h"<br>
34
+ <br>
35
+ HPDF_STATUS<br>
36
+ HPDF_ExtGState_SetAlphaStroke&nbsp; (HPDF_ExtGState&nbsp;&nbsp;
37
+ ext_gstate,<br>
38
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
39
+ HPDF_REAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value);<br>
40
+ <br>
41
+ </div>
42
+ <h4>Description<br>
43
+ </h4>
44
+ HPDF_ExtGState_SetAlphaStroke() defined the transparency for stroking.<br>
45
+ <br>
46
+ <h4>Parameter</h4>
47
+ <span style="font-weight: bold;">ext_gstate</span>
48
+ <div class="bodytext5">The handle of an extended graphics state object.<br>
49
+ <br>
50
+ </div>
51
+ <span style="font-weight: bold;">value</span>
52
+ <div class="bodytext5">The alpha constant for stroking. It must be
53
+ between 0 to 1.<br>
54
+ </div>
55
+ <br>
56
+ <h4>Returns</h4>
57
+ When HPDF_ExtGState_SetAlphaStroke() succeeds, it returns HPDF_OK.
58
+ Otherwise, it
59
+ returns error-code and error-handler is invoked.<br>
60
+ <br>
61
+ <h4>Error</h4>
62
+ <span style="font-weight: bold;">HPDF_INVALID_OBJECT</span>
63
+ <div class="bodytext5">An invalid ExtGState handle was set.<br>
64
+ <br>
65
+ </div>
66
+ <span style="font-weight: bold;">HPDF_EXT_GSTATE_READ_ONLY</span><br>
67
+ <div class="bodytext5">The ExtGState object is read only.<br>
68
+ <br>
69
+ </div>
70
+ <span style="font-weight: bold;">HPDF_EXT_GSTATE_OUT_OF_RANGE
71
+ </span>
72
+ <div class="bodytext5">An invalid value was set at value parameter.<br>
73
+ <br>
74
+ </div>
75
+ <span style="font-weight: bold;">HPDF_FAILD_TO_ALLOC_MEM</span><br>
76
+ <div class="bodytext5">Memory Allocation Failed.<br>
77
+ </div>
78
+ </div>
79
+ <br>
80
+ <h3><a name="HPDF_ExtGState_SetAlphaFill_"></a>HPDF_ExtGState_SetAlphaFill<br>
81
+ </h3>
82
+ <div class="bodytext1">
83
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
84
+ "apdf.h"<br>
85
+ <br>
86
+ HPDF_STATUS<br>
87
+ HPDF_ExtGState_SetAlphaFill&nbsp; (HPDF_ExtGState&nbsp;&nbsp;
88
+ ext_gstate,<br>
89
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
90
+ HPDF_REAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value);<br>
91
+ <br>
92
+ </div>
93
+ <h4>Description<br>
94
+ </h4>
95
+ HPDF_ExtGState_SetAlphaFill() defined the transparency for filling.<br>
96
+ <br>
97
+ <h4>Parameter</h4>
98
+ <span style="font-weight: bold;">ext_gstate</span>
99
+ <div class="bodytext5">The handle of an extended graphics state object.<br>
100
+ <br>
101
+ </div>
102
+ <span style="font-weight: bold;">value</span>
103
+ <div class="bodytext5">The alpha constant for filling. It must be
104
+ between 0 to 1.<br>
105
+ </div>
106
+ <br>
107
+ <h4>Returns</h4>
108
+ When HPDF_ExtGState_SetAlphaFill() succeeds, it returns HPDF_OK.
109
+ Otherwise, it
110
+ returns error-code and error-handler is invoked.<br>
111
+ <br>
112
+ <h4>Error</h4>
113
+ <span style="font-weight: bold;">HPDF_INVALID_OBJECT</span>
114
+ <div class="bodytext5">An invalid ExtGState handle was set.<br>
115
+ <br>
116
+ </div>
117
+ <span style="font-weight: bold;">HPDF_EXT_GSTATE_READ_ONLY</span><br>
118
+ <div class="bodytext5">The ExtGState object is read only.<br>
119
+ <br>
120
+ </div>
121
+ <span style="font-weight: bold;">HPDF_EXT_GSTATE_OUT_OF_RANGE
122
+ </span>
123
+ <div class="bodytext5">An invalid value was set at value parameter.<br>
124
+ <br>
125
+ </div>
126
+ <span style="font-weight: bold;">HPDF_FAILD_TO_ALLOC_MEM</span><br>
127
+ <div class="bodytext5">Memory Allocation Failed.<br>
128
+ </div>
129
+ </div>
130
+ <br>
131
+ <h3><a name="HPDF_ExtGState_SetBlendMode_"></a>HPDF_ExtGState_SetBlendMode<br>
132
+ </h3>
133
+ <div class="bodytext1">
134
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
135
+ "apdf.h"<br>
136
+ <br>
137
+ HPDF_ExtGState_SetBlendMode&nbsp; (HPDF_ExtGState&nbsp;&nbsp;
138
+ ext_gstate,<br>
139
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
140
+ HPDF_BlendMode&nbsp;&nbsp; bmode);<br>
141
+ <br>
142
+ </div>
143
+ <h4>Description<br>
144
+ </h4>
145
+ HPDF_ExtGState_SetBlendMode() defined the method of blending.<br>
146
+ <br>
147
+ <h4>Parameter</h4>
148
+ <span style="font-weight: bold;">ext_gstate</span>
149
+ <div class="bodytext5">The handle of an extended graphics state object.<br>
150
+ <br>
151
+ </div>
152
+ <span style="font-weight: bold;">bmode</span><br>
153
+ <div class="bodytext5">The following values are available.<br>
154
+ <ul>
155
+ <li>HPDF_BM_NORMAL</li>
156
+ <li>HPDF_BM_MULTIPLY</li>
157
+ <li>HPDF_BM_SCREEN</li>
158
+ <li>HPDF_BM_OVERLAY</li>
159
+ <li>HPDF_BM_DARKEN</li>
160
+ <li>HPDF_BM_LIGHTEN</li>
161
+ <li>HPDF_BM_COLOR_DODGE</li>
162
+ <li>HPDF_BM_COLOR_BUM</li>
163
+ <li>HPDF_BM_HARD_LIGHT</li>
164
+ <li>HPDF_BM_SOFT_LIGHT</li>
165
+ <li>HPDF_BM_DIFFERENCE</li>
166
+ <li>HPDF_BM_EXCLUSHON</li>
167
+ </ul>
168
+ </div>
169
+ <br>
170
+ <h4>Returns</h4>
171
+ When HPDF_ExtGState_SetBlendMode() succeeds, it returns HPDF_OK.
172
+ Otherwise, it
173
+ returns error-code and error-handler is invoked.<br>
174
+ <br>
175
+ <h4>Error</h4>
176
+ <span style="font-weight: bold;">HPDF_INVALID_OBJECT</span>
177
+ <div class="bodytext5">An invalid ExtGState handle was set.<br>
178
+ <br>
179
+ </div>
180
+ <span style="font-weight: bold;">HPDF_EXT_GSTATE_READ_ONLY</span><br>
181
+ <div class="bodytext5">The ExtGState object is read only.<br>
182
+ <br>
183
+ </div>
184
+ <span style="font-weight: bold;">HPDF_EXT_GSTATE_OUT_OF_RANGE
185
+ </span>
186
+ <div class="bodytext5">An invalid blend mode was set.<br>
187
+ <br>
188
+ </div>
189
+ <span style="font-weight: bold;">HPDF_FAILD_TO_ALLOC_MEM</span><br>
190
+ <div class="bodytext5">Memory Allocation Failed.<br>
191
+ </div>
192
+ </div>
193
+ <br>
194
+ <br>
195
+ <br>
196
+ <br>
197
+ <br>
198
+ <br>
199
+ <br>
200
+ <br>
201
+ <br>
202
+ <br>
203
+ <br>
204
+ <br>
205
+ <br>
206
+ <br>
207
+ <br>
208
+ <br>
209
+ <br>
210
+ <br>
211
+ <br>
212
+ <br>
213
+ </div>
214
+ </div>
215
+ <div id="lcol">
216
+ <div class="sidebar">
217
+ <ul>
218
+ </ul>
219
+ <ul>
220
+ <li><a href="#HPDF_ExtGState_SetAlphaStroke_">HPDF_ExtGState_SetAlphaStroke</a></li>
221
+ <li><a href="#HPDF_ExtGState_SetAlphaFill_">HPDF_ExtGState_SetAlphaFill</a></li>
222
+ <li><a href="#HPDF_ExtGState_SetBlendMode_">HPDF_ExtGState_SetBlendMode</a></li>
223
+ </ul>
224
+ <br>
225
+ <br>
226
+ <br>
227
+ <br>
228
+ <br>
229
+ <br>
230
+ <br>
231
+ <br>
232
+ <br>
233
+ <br>
234
+ <br>
235
+ <br>
236
+ <br>
237
+ <br>
238
+ <br>
239
+ <br>
240
+ <br>
241
+ <br>
242
+ <br>
243
+ <br>
244
+ <br>
245
+ <br>
246
+ <br>
247
+ <br>
248
+ <br>
249
+ <br>
250
+ <br>
251
+ <br>
252
+ <br>
253
+ <br>
254
+ <br>
255
+ <br>
256
+ <br>
257
+ <br>
258
+ <br>
259
+ <br>
260
+ <br>
261
+ <br>
262
+ <br>
263
+ <br>
264
+ <br>
265
+ <br>
266
+ <br>
267
+ <br>
268
+ <br>
269
+ <br>
270
+ <br>
271
+ <br>
272
+ <br>
273
+ <br>
274
+ <br>
275
+ <br>
276
+ <br>
277
+ <br>
278
+ <br>
279
+ <br>
280
+ <br>
281
+ <br>
282
+ <br>
283
+ <br>
284
+ <br>
285
+ <br>
286
+ <br>
287
+ <br>
288
+ <br>
289
+ <br>
290
+ <br>
291
+ <br>
292
+ <br>
293
+ <br>
294
+ <br>
295
+ <br>
296
+ <br>
297
+ <br>
298
+ <br>
299
+ <br>
300
+ <br>
301
+ <br>
302
+ <br>
303
+ <br>
304
+ <br>
305
+ <br>
306
+ <br>
307
+ <br>
308
+ <br>
309
+ <br>
310
+ <br>
311
+ <br>
312
+ <br>
313
+ <br>
314
+ <br>
315
+ <br>
316
+ <br>
317
+ <br>
318
+ <br>
319
+ <br>
320
+ <br>
321
+ <br>
322
+ <br>
323
+ <br>
324
+ <br>
325
+ <br>
326
+ <br>
327
+ <br>
328
+ <br>
329
+ <br>
330
+ <br>
331
+ <br>
332
+ <br>
333
+ <br>
334
+ <br>
335
+ <br>
336
+ <br>
337
+ <br>
338
+ <br>
339
+ <br>
340
+ <br>
341
+ <br>
342
+ <br>
343
+ <br>
344
+ <br>
345
+ <br>
346
+ <br>
347
+ <br>
348
+ <br>
349
+ <br>
350
+ <br>
351
+ <br>
352
+ <br>
353
+ <br>
354
+ <br>
355
+ <br>
356
+ <br>
357
+ <br>
358
+ <br>
359
+ <br>
360
+ <br>
361
+ <br>
362
+ <br>
363
+ <br>
364
+ <br>
365
+ <br>
366
+ <br>
367
+ <br>
368
+ <br>
369
+ <br>
370
+ <br>
371
+ <br>
372
+ <br>
373
+ <br>
374
+ <br>
375
+ <br>
376
+ <br>
377
+ <br>
378
+ <br>
379
+ <br>
380
+ <br>
381
+ <br>
382
+ <br>
383
+ <br>
384
+ <br>
385
+ <br>
386
+ <br>
387
+ <br>
388
+ <br>
389
+ <br>
390
+ </div>
391
+ </div>
392
+ <br>
393
+ <br>
394
+ <br>
395
+ <br>
396
+ <br>
397
+ <br>
398
+ <br>
399
+ <br>
400
+ <br>
401
+ <br>
402
+ <br>
403
+ <br>
404
+ <br>
405
+ </div>
406
+ </body>
407
+ </html>
@@ -0,0 +1,669 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
2
+ <html lang="en">
3
+ <head>
4
+ <title>Haru Free PDF Library</title>
5
+ <meta http-equiv="Content-Type"
6
+ content="text/html; charset=iso-8859-1">
7
+ <link href="api.css" type="text/css" rel="stylesheet">
8
+ </head>
9
+ <body>
10
+ <div id="headcontainer">
11
+ <div class="head"><img alt="Haru Free PDF Library"
12
+ src="image/harulogo.png" style="width: 413px; height: 40px;"></div>
13
+ </div>
14
+ <div id="barcontainer">
15
+ <div class="buildbar"><a href="index.html">home</a> | <a
16
+ href="http://sourceforge.net/project/showfiles.php?group_id=83044">download</a>
17
+ |
18
+ <a href="documentation.html">documentation</a> | <a
19
+ href="examples.html">examples </a>| <a
20
+ href="http://sourceforge.net/projects/libharu/">sourceforge</a> |
21
+ <a href="http://sourceforge.net/forum/?group_id=83044">forums</a><br>
22
+ </div>
23
+ </div>
24
+ <div id="container">
25
+ <div id="mainpage">
26
+ <div id="ccol">
27
+ <h2>Font Functions<br>
28
+ </h2>
29
+ <h3><a name="HPDF_Font_GetFontName_"></a>HPDF_Font_GetFontName<br>
30
+ </h3>
31
+ <div class="bodytext1">
32
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
33
+ "apdf.h"<br>
34
+ <br>
35
+ <span style="font-weight: bold;">const </span>char *<br>
36
+ HPDF_Font_GetFontName&nbsp; (HPDF_Font&nbsp;&nbsp;&nbsp; font);<br>
37
+ <br>
38
+ </div>
39
+ <h4>Description<br>
40
+ </h4>
41
+ HPDF_Font_GetFontName() gets the name of the font.<br>
42
+ <br>
43
+ <h4>Parameter</h4>
44
+ <span style="font-weight: bold;">font</span>
45
+ <div class="bodytext5">The handle of an font object.<br>
46
+ </div>
47
+ <br>
48
+ <h4>Returns</h4>
49
+ When HPDF_Font_GetFontName() succeed, it returns the name of the font.
50
+ Otherwise, it returns NULL.<br>
51
+ </div>
52
+ <br>
53
+ <h3>HPDF_Font_GetEncodingName<br>
54
+ </h3>
55
+ <div class="bodytext1">
56
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
57
+ "apdf.h"<br>
58
+ <br>
59
+ <span style="font-weight: bold;">const </span>char *<br>
60
+ HPDF_Font_GetEncodingName&nbsp; (HPDF_Font&nbsp;&nbsp;&nbsp; font);<br>
61
+ <br>
62
+ </div>
63
+ <h4>Description<br>
64
+ </h4>
65
+ HPDF_Font_GetEncodingName() gets the encoding name of the font.<br>
66
+ <br>
67
+ <h4>Parameter</h4>
68
+ <span style="font-weight: bold;">font</span>
69
+ <div class="bodytext5">The handle of a font object.<br>
70
+ </div>
71
+ <br>
72
+ <h4>Returns</h4>
73
+ When HPDF_Font_GetEncodingName() succeed, it returns the encoding name
74
+ of the font. Otherwise, it returns NULL.<br>
75
+ </div>
76
+ <br>
77
+ <h3>HPDF_Font_GetUnicodeWidth<br>
78
+ </h3>
79
+ <div class="bodytext1">
80
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
81
+ "apdf.h"<br>
82
+ <br>
83
+ HPDF_INT<br>
84
+ HPDF_Font_GetUnicodeWidth&nbsp;
85
+ (HPDF_Font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font,<br>
86
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
87
+ HPDF_UNICODE&nbsp;&nbsp;&nbsp; code);<br>
88
+ <br>
89
+ </div>
90
+ <h4>Description<br>
91
+ </h4>
92
+ HPDF_Font_GetUnicodeWidth() gets the width of a charactor in the font.<br>
93
+ Actual width of the character on the page can be calculated by the
94
+ following <br>
95
+ expressions. <br>
96
+ <br>
97
+ <div class="bodycode"><br>
98
+ char_width = HPDF_Font_GetUnicodeWidth (font, UNICODE);<br>
99
+ float actual_width = char_width * FONT_SIZE / 1000;<br>
100
+ <br>
101
+ </div>
102
+ <br>
103
+ <h4>Parameter</h4>
104
+ <span style="font-weight: bold;">font</span>
105
+ <div class="bodytext5">The handle of an font object.<br>
106
+ </div>
107
+ <br>
108
+ <span style="font-weight: bold;">code</span><br>
109
+ <div class="bodytext5">A unicode of the charactor.<br>
110
+ </div>
111
+ <br>
112
+ <h4>Returns</h4>
113
+ When HPDF_Font_GetUnicodeWidth() succeed, it returns the width of the
114
+ font. Otherwise it returns 0.<br>
115
+ <br>
116
+ <br>
117
+ </div>
118
+ <h3><a name="HPDF_Font_GetBBox_"></a>HPDF_Font_GetBBox<br>
119
+ </h3>
120
+ <div class="bodytext1">
121
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
122
+ "apdf.h"<br>
123
+ <br>
124
+ typedef&nbsp; struct _HPDF_Rect {<br>
125
+ &nbsp;&nbsp;&nbsp; HPDF_REAL&nbsp; left;<br>
126
+ &nbsp;&nbsp;&nbsp; HPDF_REAL&nbsp; bottom;<br>
127
+ &nbsp;&nbsp;&nbsp; HPDF_REAL&nbsp; right;<br>
128
+ &nbsp;&nbsp;&nbsp; HPDF_REAL&nbsp; top;<br>
129
+ } HPDF_Rect;<br>
130
+ <br>
131
+ typedef struct _HPDF_Rect HPDF_Box;<br>
132
+ <br>
133
+ HPDF_Box<br>
134
+ HPDF_Font_GetBBox&nbsp; (HPDF_Font&nbsp;&nbsp;&nbsp; font);<br>
135
+ <br>
136
+ </div>
137
+ <h4>Description<br>
138
+ </h4>
139
+ HPDF_Font_GetBBox() gets the bounding box of the font.<br>
140
+ <br>
141
+ <h4>Parameter</h4>
142
+ <span style="font-weight: bold;">font</span>
143
+ <div class="bodytext5">The handle of a font object.<br>
144
+ </div>
145
+ <br>
146
+ <h4>Returns</h4>
147
+ When HPDF_Font_GetBox() succeed, it returns the HPDF_Box struct
148
+ specifying the font bounding box.
149
+ Otherwise, it returns a HPDF_Box struct of {0, 0, 0, 0}.<br>
150
+ </div>
151
+ <br>
152
+ <h3><a name="HPDF_Font_GetAscent_"></a>HPDF_Font_GetAscent<br>
153
+ </h3>
154
+ <div class="bodytext1">
155
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
156
+ "apdf.h"<br>
157
+ <br>
158
+ HPDF_INT<br>
159
+ HPDF_Font_GetAscent (HPDF_Font&nbsp;&nbsp;&nbsp; font);<br>
160
+ <br>
161
+ </div>
162
+ <h4>Description<br>
163
+ </h4>
164
+ HPDF_Font_GetAscent() gets the vertical ascent of the font. <br>
165
+ <br>
166
+ <h4>Parameter</h4>
167
+ <span style="font-weight: bold;">font</span>
168
+ <div class="bodytext5">The handle of a font object.
169
+ </div>
170
+ <br>
171
+ <h4>Returns</h4>
172
+ When HPDF_Font_GetAscent() succeed, it returns vertical ascent of the
173
+ font. Otherwise, it returns 0.<br>
174
+ </div>
175
+ <br>
176
+ <h3><a name="HPDF_Font_GetDescent_"></a>HPDF_Font_GetDescent<br>
177
+ </h3>
178
+ <div class="bodytext1">
179
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
180
+ "apdf.h"<br>
181
+ <br>
182
+ HPDF_INT<br>
183
+ HPDF_Font_GetDescent (HPDF_Font&nbsp;&nbsp;&nbsp; font);<br>
184
+ <br>
185
+ </div>
186
+ <h4>Description<br>
187
+ </h4>
188
+ HPDF_Font_GetDescent() gets the vertical descent of the font. <br>
189
+ <br>
190
+ <h4>Parameter</h4>
191
+ <span style="font-weight: bold;">font</span>
192
+ <div class="bodytext5">The handle of a font object.
193
+ </div>
194
+ <br>
195
+ <h4>Returns</h4>
196
+ When HPDF_Font_GetDescent() succeed, it returns vertical descent of the
197
+ font. Otherwise, it returns 0.<br>
198
+ </div>
199
+ <br>
200
+ <h3><a name="HPDF_Font_GetXHeight_"></a>HPDF_Font_GetXHeight<br>
201
+ </h3>
202
+ <div class="bodytext1">
203
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
204
+ "apdf.h"<br>
205
+ <br>
206
+ HPDF_UINT<br>
207
+ HPDF_Font_GetXHeight&nbsp; (HPDF_Font&nbsp;&nbsp;&nbsp; font);<br>
208
+ <br>
209
+ </div>
210
+ <h4>Description<br>
211
+ </h4>
212
+ HPDF_Font_GetXHeight() gets the distance from the baseline of lowercase
213
+ letters. <br>
214
+ <br>
215
+ <h4>Parameter</h4>
216
+ <span style="font-weight: bold;">font</span>
217
+ <div class="bodytext5">The handle of a font object.
218
+ </div>
219
+ <br>
220
+ <h4>Returns</h4>
221
+ When HPDF_Font_GetXHeight() succeed, it returns the x-height's value of
222
+ the font. Otherwise, it returns 0.<br>
223
+ </div>
224
+ <br>
225
+ <h3><a name="HPDF_Font_GetCapHeight_"></a>HPDF_Font_GetCapHeight<br>
226
+ </h3>
227
+ <div class="bodytext1">
228
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
229
+ "apdf.h"<br>
230
+ <br>
231
+ HPDF_UINT<br>
232
+ HPDF_Font_GetCapHeight (HPDF_Font&nbsp;&nbsp;&nbsp; font);<br>
233
+ <br>
234
+ </div>
235
+ <h4>Description<br>
236
+ </h4>
237
+ HPDF_Font_GetCapHeight() gets the distance from the baseline of
238
+ uppercase letters. <br>
239
+ <br>
240
+ <h4>Parameter</h4>
241
+ <span style="font-weight: bold;">font</span>
242
+ <div class="bodytext5">The handle of a font object.
243
+ </div>
244
+ <br>
245
+ <h4>Returns</h4>
246
+ When HPDF_Font_GetCapHeight() succeed, it returns the cap-height's
247
+ value of the font. Otherwise, it returns 0.<br>
248
+ </div>
249
+ <br>
250
+ <h3><a name="HPDF_Font_TextWidth_"></a>HPDF_Font_TextWidth<br>
251
+ </h3>
252
+ <div class="bodytext1">
253
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
254
+ "apdf.h"<br>
255
+ <br>
256
+ typedef struct _HPDF_TextWidth {<br>
257
+ &nbsp;&nbsp;&nbsp; HPDF_UINT numchars;<br>
258
+ &nbsp;&nbsp;&nbsp; HPDF_UINT numwords;<br>
259
+ &nbsp;&nbsp;&nbsp; HPDF_UINT width;<br>
260
+ &nbsp;&nbsp;&nbsp; HPDF_UINT numspace;<br>
261
+ } HPDF_TextWidth;<br>
262
+ <br>
263
+ HPDF_TextWidth<br>
264
+ HPDF_Font_TextWidth&nbsp;
265
+ (HPDF_Font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font,<br>
266
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
267
+ const HPDF_BYTE&nbsp;&nbsp; *text,<br>
268
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
269
+ HPDF_UINT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; len);<br>
270
+ <br>
271
+ </div>
272
+ <h4>Description<br>
273
+ </h4>
274
+ HPDF_Font_TextWidth() gets total width of the text, number of
275
+ charactors and number of the words. <br>
276
+ <br>
277
+ <h4>Parameter</h4>
278
+ <span style="font-weight: bold;">font</span>
279
+ <div class="bodytext5">The handle of a font object.
280
+ </div>
281
+ <br>
282
+ <span style="font-weight: bold;">text</span><br>
283
+ <div class="bodytext5">The text to get width.
284
+ </div>
285
+ <br>
286
+ <span style="font-weight: bold;">len</span><br>
287
+ <div class="bodytext5">The byte length of the text.<br>
288
+ </div>
289
+ <br>
290
+ <h4>Returns</h4>
291
+ When HPDF_Font_TextWidth() succeed, it returns a HPDF_TextWidth struct
292
+ including calculation result. Otherwise, it returns a HPDF_TextWidth
293
+ struct whose attributes are all ZERO.</div>
294
+ <br>
295
+ <h3><a name="HPDF_Font_MeasureText_"></a>HPDF_Font_MeasureText<br>
296
+ </h3>
297
+ <div class="bodytext1">
298
+ <div class="bodycode2"><span style="font-weight: bold;">#include</span>
299
+ "apdf.h"<br>
300
+ <br>
301
+ HPDF_UINT<br>
302
+ HPDF_Font_MeasureText
303
+ (HPDF_Font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font,<br>
304
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
305
+ const HPDF_BYTE&nbsp;&nbsp; *text,<br>
306
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
307
+ HPDF_UINT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; len,<br>
308
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
309
+ HPDF_REAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width,<br>
310
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
311
+ HPDF_REAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
312
+ font_size,<br>
313
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
314
+ HPDF_REAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
315
+ char_space,<br>
316
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
317
+ HPDF_REAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
318
+ word_space,<br>
319
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
320
+ HPDF_BOOL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
321
+ wordwrap,<br>
322
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
323
+ HPDF_REAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *real_width);<br>
324
+ <br>
325
+ </div>
326
+ <h4>Description<br>
327
+ </h4>
328
+ HPDF_Font_MeasureText() calculates the byte length which can be
329
+ included within the specified width.<br>
330
+ <br>
331
+ <h4>Parameter</h4>
332
+ <span style="font-weight: bold;">font</span>
333
+ <div class="bodytext5">Specify the handle of a font object.<br>
334
+ <br>
335
+ </div>
336
+ <span style="font-weight: bold;">text</span>
337
+ <div class="bodytext5">A text that is used to calculate.<br>
338
+ <br>
339
+ </div>
340
+ <span style="font-weight: bold;">len</span><br>
341
+ <div class="bodytext5">The length of the text.<br>
342
+ <br>
343
+ </div>
344
+ <span style="font-weight: bold;">width</span><br>
345
+ <div class="bodytext5">The width of the area to put the text.<br>
346
+ <br>
347
+ </div>
348
+ <span style="font-weight: bold;">font_size</span><br>
349
+ <div class="bodytext5">The size of the font.<br>
350
+ <br>
351
+ </div>
352
+ <span style="font-weight: bold;">char_space</span><br>
353
+ <div class="bodytext5">The character spacing.<br>
354
+ <br>
355
+ </div>
356
+ <span style="font-weight: bold;">word_space</span><br>
357
+ <div class="bodytext5">The word spacing.<br>
358
+ <br>
359
+ </div>
360
+ <span style="font-weight: bold;">wordwrap</span><br>
361
+ <div class="bodytext5">When there are three words of "ABCDE", "FGH",
362
+ and "IJKL", and the substring until "J" can be included within the
363
+ width, if word_wrap parameter is HPDF_FALSE it returns 12,&nbsp; and if
364
+ word_wrap parameter is HPDF_FALSE word_wrap parameter is HPDF_FALSE it
365
+ returns 10 (the end of the previous word).<br>
366
+ <img alt="figure9" src="image/figure9.png"
367
+ style="width: 286px; height: 83px;"><br>
368
+ </div>
369
+ <br>
370
+ <span style="font-weight: bold;">real_width</span><br>
371
+ <div class="bodytext5">If this parameter is not NULL, the real widths
372
+ of the text is set. An application can set it to NULL if it is
373
+ unnecessary<br>
374
+ </div>
375
+ <br>
376
+ <h4>Returns</h4>
377
+ When HPDF_Font_SetColorMask() succeed, it returns the byte length which
378
+ can be included within the specified width.
379
+ Otherwise it returns 0.<br>
380
+ </div>
381
+ <br>
382
+ <br>
383
+ <br>
384
+ <br>
385
+ </div>
386
+ </div>
387
+ <div id="lcol">
388
+ <div class="sidebar">
389
+ <ul>
390
+ </ul>
391
+ <ul>
392
+ <li><a href="#HPDF_Font_GetFontName_">HPDF_Font_GetFontName</a></li>
393
+ <li><a href="#HPDF_Font_GetBBox_">HPDF_Font_GetBBox</a></li>
394
+ <li><a href="#HPDF_Font_GetAscent_">HPDF_Font_GetAscent</a></li>
395
+ <li><a href="#HPDF_Font_GetDescent_">HPDF_Font_GetDescent</a></li>
396
+ <li><a href="#HPDF_Font_GetXHeight_">HPDF_Font_GetXHeight</a></li>
397
+ <li><a href="#HPDF_Font_GetCapHeight_">HPDF_Font_GetCapHeight</a></li>
398
+ <li><a href="#HPDF_Font_TextWidth_">HPDF_Font_TextWidth</a></li>
399
+ <li><a href="#HPDF_Font_MeasureText_">HPDF_Font_MeasureText</a></li>
400
+ </ul>
401
+ <br>
402
+ <br>
403
+ <br>
404
+ <br>
405
+ <br>
406
+ <br>
407
+ <br>
408
+ <br>
409
+ <br>
410
+ <br>
411
+ <br>
412
+ <br>
413
+ <br>
414
+ <br>
415
+ <br>
416
+ <br>
417
+ <br>
418
+ <br>
419
+ <br>
420
+ <br>
421
+ <br>
422
+ <br>
423
+ <br>
424
+ <br>
425
+ <br>
426
+ <br>
427
+ <br>
428
+ <br>
429
+ <br>
430
+ <br>
431
+ <br>
432
+ <br>
433
+ <br>
434
+ <br>
435
+ <br>
436
+ <br>
437
+ <br>
438
+ <br>
439
+ <br>
440
+ <br>
441
+ <br>
442
+ <br>
443
+ <br>
444
+ <br>
445
+ <br>
446
+ <br>
447
+ <br>
448
+ <br>
449
+ <br>
450
+ <br>
451
+ <br>
452
+ <br>
453
+ <br>
454
+ <br>
455
+ <br>
456
+ <br>
457
+ <br>
458
+ <br>
459
+ <br>
460
+ <br>
461
+ <br>
462
+ <br>
463
+ <br>
464
+ <br>
465
+ <br>
466
+ <br>
467
+ <br>
468
+ <br>
469
+ <br>
470
+ <br>
471
+ <br>
472
+ <br>
473
+ <br>
474
+ <br>
475
+ <br>
476
+ <br>
477
+ <br>
478
+ <br>
479
+ <br>
480
+ <br>
481
+ <br>
482
+ <br>
483
+ <br>
484
+ <br>
485
+ <br>
486
+ <br>
487
+ <br>
488
+ <br>
489
+ <br>
490
+ <br>
491
+ <br>
492
+ <br>
493
+ <br>
494
+ <br>
495
+ <br>
496
+ <br>
497
+ <br>
498
+ <br>
499
+ <br>
500
+ <br>
501
+ <br>
502
+ <br>
503
+ <br>
504
+ <br>
505
+ <br>
506
+ <br>
507
+ <br>
508
+ <br>
509
+ <br>
510
+ <br>
511
+ <br>
512
+ <br>
513
+ <br>
514
+ <br>
515
+ <br>
516
+ <br>
517
+ <br>
518
+ <br>
519
+ <br>
520
+ <br>
521
+ <br>
522
+ <br>
523
+ <br>
524
+ <br>
525
+ <br>
526
+ <br>
527
+ <br>
528
+ <br>
529
+ <br>
530
+ <br>
531
+ <br>
532
+ <br>
533
+ <br>
534
+ <br>
535
+ <br>
536
+ <br>
537
+ <br>
538
+ <br>
539
+ <br>
540
+ <br>
541
+ <br>
542
+ <br>
543
+ <br>
544
+ <br>
545
+ <br>
546
+ <br>
547
+ <br>
548
+ <br>
549
+ <br>
550
+ <br>
551
+ <br>
552
+ <br>
553
+ <br>
554
+ <br>
555
+ <br>
556
+ <br>
557
+ <br>
558
+ <br>
559
+ <br>
560
+ <br>
561
+ <br>
562
+ <br>
563
+ <br>
564
+ <br>
565
+ <br>
566
+ <br>
567
+ <br>
568
+ <br>
569
+ <br>
570
+ <br>
571
+ <br>
572
+ <br>
573
+ <br>
574
+ <br>
575
+ <br>
576
+ <br>
577
+ <br>
578
+ <br>
579
+ <br>
580
+ <br>
581
+ <br>
582
+ <br>
583
+ <br>
584
+ <br>
585
+ <br>
586
+ <br>
587
+ <br>
588
+ <br>
589
+ <br>
590
+ <br>
591
+ <br>
592
+ <br>
593
+ <br>
594
+ <br>
595
+ <br>
596
+ <br>
597
+ <br>
598
+ <br>
599
+ <br>
600
+ <br>
601
+ <br>
602
+ <br>
603
+ <br>
604
+ <br>
605
+ <br>
606
+ <br>
607
+ <br>
608
+ <br>
609
+ <br>
610
+ <br>
611
+ <br>
612
+ <br>
613
+ <br>
614
+ <br>
615
+ <br>
616
+ <br>
617
+ <br>
618
+ <br>
619
+ <br>
620
+ <br>
621
+ <br>
622
+ <br>
623
+ <br>
624
+ <br>
625
+ <br>
626
+ <br>
627
+ <br>
628
+ <br>
629
+ <br>
630
+ <br>
631
+ <br>
632
+ <br>
633
+ <br>
634
+ <br>
635
+ <br>
636
+ <br>
637
+ <br>
638
+ <br>
639
+ <br>
640
+ <br>
641
+ <br>
642
+ <br>
643
+ <br>
644
+ <br>
645
+ <br>
646
+ <br>
647
+ <br>
648
+ <br>
649
+ <br>
650
+ <br>
651
+ <br>
652
+ </div>
653
+ </div>
654
+ <br>
655
+ <br>
656
+ <br>
657
+ <br>
658
+ <br>
659
+ <br>
660
+ <br>
661
+ <br>
662
+ <br>
663
+ <br>
664
+ <br>
665
+ <br>
666
+ <br>
667
+ </div>
668
+ </body>
669
+ </html>