1 | /* |
2 | * << Haru Free PDF Library 2.0.8 >> -- hpdf.h |
3 | * |
4 | * URL http://libharu.org/ |
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_H |
18 | #define _HPDF_H |
19 | |
20 | #include "hpdf_config.h" |
21 | #include "hpdf_version.h" |
22 | |
23 | #define HPDF_UNUSED(a) ((void)(a)) |
24 | |
25 | #ifdef HPDF_DLL_MAKE |
26 | # define HPDF_EXPORT(A) __declspec(dllexport) A __stdcall |
27 | #else |
28 | # ifdef HPDF_DLL_MAKE_CDECL |
29 | # define HPDF_EXPORT(A) __declspec(dllexport) A |
30 | # else |
31 | # ifdef HPDF_SHARED_MAKE |
32 | # define HPDF_EXPORT(A) extern A |
33 | # endif /* HPDF_SHARED_MAKE */ |
34 | # endif /* HPDF_DLL_MAKE_CDECL */ |
35 | #endif /* HPDF_DLL_MAKE */ |
36 | |
37 | #ifdef HPDF_DLL |
38 | # define HPDF_SHARED |
39 | # define HPDF_EXPORT(A) __declspec(dllimport) A __stdcall |
40 | #else |
41 | # ifdef HPDF_DLL_CDECL |
42 | # define HPDF_SHARED |
43 | # define HPDF_EXPORT(A) __declspec(dllimport) A |
44 | # endif /* HPDF_DLL_CDECL */ |
45 | #endif /* HPDF_DLL */ |
46 | |
47 | #ifdef HPDF_SHARED |
48 | |
49 | #ifndef HPDF_EXPORT |
50 | #define HPDF_EXPORT(A) extern A |
51 | #endif /* HPDF_EXPORT */ |
52 | |
53 | #include "hpdf_consts.h" |
54 | #include "hpdf_types.h" |
55 | |
56 | typedef void *HPDF_HANDLE; |
57 | typedef HPDF_HANDLE HPDF_Doc; |
58 | typedef HPDF_HANDLE HPDF_Page; |
59 | typedef HPDF_HANDLE HPDF_Pages; |
60 | typedef HPDF_HANDLE HPDF_Stream; |
61 | typedef HPDF_HANDLE HPDF_Image; |
62 | typedef HPDF_HANDLE HPDF_Font; |
63 | typedef HPDF_HANDLE HPDF_Outline; |
64 | typedef HPDF_HANDLE HPDF_Encoder; |
65 | typedef HPDF_HANDLE HPDF_3DMeasure; |
66 | typedef HPDF_HANDLE HPDF_ExData; |
67 | typedef HPDF_HANDLE HPDF_Destination; |
68 | typedef HPDF_HANDLE HPDF_XObject; |
69 | typedef HPDF_HANDLE HPDF_Annotation; |
70 | typedef HPDF_HANDLE HPDF_ExtGState; |
71 | typedef HPDF_HANDLE HPDF_FontDef; |
72 | typedef HPDF_HANDLE HPDF_U3D; |
73 | typedef HPDF_HANDLE HPDF_JavaScript; |
74 | typedef HPDF_HANDLE HPDF_Error; |
75 | typedef HPDF_HANDLE HPDF_MMgr; |
76 | typedef HPDF_HANDLE HPDF_Dict; |
77 | typedef HPDF_HANDLE HPDF_EmbeddedFile; |
78 | typedef HPDF_HANDLE HPDF_OutputIntent; |
79 | typedef HPDF_HANDLE HPDF_Xref; |
80 | |
81 | #else |
82 | |
83 | #ifndef HPDF_EXPORT |
84 | #define HPDF_EXPORT(A) A |
85 | #endif /* HPDF_EXPORT */ |
86 | |
87 | #include "hpdf_consts.h" |
88 | #include "hpdf_doc.h" |
89 | #include "hpdf_error.h" |
90 | #include "hpdf_pdfa.h" |
91 | |
92 | #endif /* HPDF_SHARED */ |
93 | |
94 | #ifdef __cplusplus |
95 | extern "C" { |
96 | #endif |
97 | |
98 | HPDF_EXPORT(const char *) |
99 | HPDF_GetVersion (void); |
100 | |
101 | |
102 | HPDF_EXPORT(HPDF_Doc) |
103 | HPDF_NewEx (HPDF_Error_Handler user_error_fn, |
104 | HPDF_Alloc_Func user_alloc_fn, |
105 | HPDF_Free_Func user_free_fn, |
106 | HPDF_UINT mem_pool_buf_size, |
107 | void *user_data); |
108 | |
109 | HPDF_EXPORT(HPDF_Doc) |
110 | HPDF_New (HPDF_Error_Handler user_error_fn, |
111 | void *user_data); |
112 | |
113 | |
114 | HPDF_EXPORT(HPDF_STATUS) |
115 | HPDF_SetErrorHandler (HPDF_Doc pdf, |
116 | HPDF_Error_Handler user_error_fn); |
117 | |
118 | |
119 | HPDF_EXPORT(void) |
120 | HPDF_Free (HPDF_Doc pdf); |
121 | |
122 | |
123 | HPDF_EXPORT(HPDF_STATUS) |
124 | HPDF_NewDoc (HPDF_Doc pdf); |
125 | |
126 | |
127 | HPDF_EXPORT(void) |
128 | HPDF_FreeDoc (HPDF_Doc pdf); |
129 | |
130 | |
131 | HPDF_EXPORT(HPDF_BOOL) |
132 | HPDF_HasDoc (HPDF_Doc pdf); |
133 | |
134 | |
135 | HPDF_EXPORT(void) |
136 | HPDF_FreeDocAll (HPDF_Doc pdf); |
137 | |
138 | |
139 | HPDF_EXPORT(HPDF_STATUS) |
140 | HPDF_SaveToStream (HPDF_Doc pdf); |
141 | |
142 | HPDF_EXPORT(HPDF_STATUS) |
143 | HPDF_GetContents (HPDF_Doc pdf, |
144 | HPDF_BYTE *buf, |
145 | HPDF_UINT32 *size); |
146 | |
147 | HPDF_EXPORT(HPDF_UINT32) |
148 | HPDF_GetStreamSize (HPDF_Doc pdf); |
149 | |
150 | |
151 | HPDF_EXPORT(HPDF_STATUS) |
152 | HPDF_ReadFromStream (HPDF_Doc pdf, |
153 | HPDF_BYTE *buf, |
154 | HPDF_UINT32 *size); |
155 | |
156 | |
157 | HPDF_EXPORT(HPDF_STATUS) |
158 | HPDF_ResetStream (HPDF_Doc pdf); |
159 | |
160 | |
161 | HPDF_EXPORT(HPDF_STATUS) |
162 | HPDF_SaveToFile (HPDF_Doc pdf, |
163 | const char *file_name); |
164 | |
165 | |
166 | HPDF_EXPORT(HPDF_STATUS) |
167 | HPDF_GetError (HPDF_Doc pdf); |
168 | |
169 | |
170 | HPDF_EXPORT(HPDF_STATUS) |
171 | HPDF_GetErrorDetail (HPDF_Doc pdf); |
172 | |
173 | HPDF_EXPORT(void) |
174 | HPDF_ResetError (HPDF_Doc pdf); |
175 | |
176 | |
177 | HPDF_EXPORT(HPDF_STATUS) |
178 | HPDF_CheckError (HPDF_Error error); |
179 | |
180 | |
181 | HPDF_EXPORT(HPDF_STATUS) |
182 | HPDF_SetPagesConfiguration (HPDF_Doc pdf, |
183 | HPDF_UINT page_per_pages); |
184 | |
185 | |
186 | HPDF_EXPORT(HPDF_Page) |
187 | HPDF_GetPageByIndex (HPDF_Doc pdf, |
188 | HPDF_UINT index); |
189 | |
190 | |
191 | /*---------------------------------------------------------------------------*/ |
192 | /*---------------------------------------------------------------------------*/ |
193 | |
194 | HPDF_EXPORT(HPDF_PageLayout) |
195 | HPDF_GetPageLayout (HPDF_Doc pdf); |
196 | |
197 | |
198 | HPDF_EXPORT(HPDF_STATUS) |
199 | HPDF_SetPageLayout (HPDF_Doc pdf, |
200 | HPDF_PageLayout layout); |
201 | |
202 | |
203 | HPDF_EXPORT(HPDF_PageMode) |
204 | HPDF_GetPageMode (HPDF_Doc pdf); |
205 | |
206 | |
207 | HPDF_EXPORT(HPDF_STATUS) |
208 | HPDF_SetPageMode (HPDF_Doc pdf, |
209 | HPDF_PageMode mode); |
210 | |
211 | |
212 | HPDF_EXPORT(HPDF_UINT) |
213 | HPDF_GetViewerPreference (HPDF_Doc pdf); |
214 | |
215 | |
216 | HPDF_EXPORT(HPDF_STATUS) |
217 | HPDF_SetViewerPreference (HPDF_Doc pdf, |
218 | HPDF_UINT value); |
219 | |
220 | |
221 | HPDF_EXPORT(HPDF_STATUS) |
222 | HPDF_SetOpenAction (HPDF_Doc pdf, |
223 | HPDF_Destination open_action); |
224 | |
225 | |
226 | /*---------------------------------------------------------------------------*/ |
227 | /*----- page handling -------------------------------------------------------*/ |
228 | |
229 | |
230 | HPDF_EXPORT(HPDF_Page) |
231 | HPDF_GetCurrentPage (HPDF_Doc pdf); |
232 | |
233 | |
234 | HPDF_EXPORT(HPDF_Page) |
235 | HPDF_AddPage (HPDF_Doc pdf); |
236 | |
237 | |
238 | HPDF_EXPORT(HPDF_Page) |
239 | HPDF_InsertPage (HPDF_Doc pdf, |
240 | HPDF_Page page); |
241 | |
242 | |
243 | HPDF_EXPORT(HPDF_STATUS) |
244 | HPDF_Page_SetWidth (HPDF_Page page, |
245 | HPDF_REAL value); |
246 | |
247 | |
248 | HPDF_EXPORT(HPDF_STATUS) |
249 | HPDF_Page_SetHeight (HPDF_Page page, |
250 | HPDF_REAL value); |
251 | |
252 | |
253 | HPDF_EXPORT(HPDF_STATUS) |
254 | HPDF_Page_SetSize (HPDF_Page page, |
255 | HPDF_PageSizes size, |
256 | HPDF_PageDirection direction); |
257 | |
258 | HPDF_EXPORT(HPDF_STATUS) |
259 | HPDF_Page_SetRotate (HPDF_Page page, |
260 | HPDF_UINT16 angle); |
261 | |
262 | HPDF_EXPORT(HPDF_STATUS) |
263 | HPDF_Page_SetZoom (HPDF_Page page, |
264 | HPDF_REAL zoom); |
265 | |
266 | /*---------------------------------------------------------------------------*/ |
267 | /*----- font handling -------------------------------------------------------*/ |
268 | |
269 | |
270 | HPDF_EXPORT(HPDF_Font) |
271 | HPDF_GetFont (HPDF_Doc pdf, |
272 | const char *font_name, |
273 | const char *encoding_name); |
274 | |
275 | |
276 | HPDF_EXPORT(const char*) |
277 | HPDF_LoadType1FontFromFile (HPDF_Doc pdf, |
278 | const char *afm_file_name, |
279 | const char *data_file_name); |
280 | |
281 | |
282 | HPDF_EXPORT(HPDF_FontDef) |
283 | HPDF_GetTTFontDefFromFile (HPDF_Doc pdf, |
284 | const char *file_name, |
285 | HPDF_BOOL embedding); |
286 | |
287 | HPDF_EXPORT(const char*) |
288 | HPDF_LoadTTFontFromFile (HPDF_Doc pdf, |
289 | const char *file_name, |
290 | HPDF_BOOL embedding); |
291 | |
292 | |
293 | HPDF_EXPORT(const char*) |
294 | HPDF_LoadTTFontFromFile2 (HPDF_Doc pdf, |
295 | const char *file_name, |
296 | HPDF_UINT index, |
297 | HPDF_BOOL embedding); |
298 | |
299 | |
300 | HPDF_EXPORT(HPDF_STATUS) |
301 | HPDF_AddPageLabel (HPDF_Doc pdf, |
302 | HPDF_UINT page_num, |
303 | HPDF_PageNumStyle style, |
304 | HPDF_UINT first_page, |
305 | const char *prefix); |
306 | |
307 | |
308 | HPDF_EXPORT(HPDF_STATUS) |
309 | HPDF_UseJPFonts (HPDF_Doc pdf); |
310 | |
311 | |
312 | HPDF_EXPORT(HPDF_STATUS) |
313 | HPDF_UseKRFonts (HPDF_Doc pdf); |
314 | |
315 | |
316 | HPDF_EXPORT(HPDF_STATUS) |
317 | HPDF_UseCNSFonts (HPDF_Doc pdf); |
318 | |
319 | |
320 | HPDF_EXPORT(HPDF_STATUS) |
321 | HPDF_UseCNTFonts (HPDF_Doc pdf); |
322 | |
323 | |
324 | /*--------------------------------------------------------------------------*/ |
325 | /*----- outline ------------------------------------------------------------*/ |
326 | |
327 | |
328 | HPDF_EXPORT(HPDF_Outline) |
329 | HPDF_CreateOutline (HPDF_Doc pdf, |
330 | HPDF_Outline parent, |
331 | const char *title, |
332 | HPDF_Encoder encoder); |
333 | |
334 | |
335 | HPDF_EXPORT(HPDF_STATUS) |
336 | HPDF_Outline_SetOpened (HPDF_Outline outline, |
337 | HPDF_BOOL opened); |
338 | |
339 | |
340 | HPDF_EXPORT(HPDF_STATUS) |
341 | HPDF_Outline_SetDestination (HPDF_Outline outline, |
342 | HPDF_Destination dst); |
343 | |
344 | |
345 | /*--------------------------------------------------------------------------*/ |
346 | /*----- destination --------------------------------------------------------*/ |
347 | |
348 | HPDF_EXPORT(HPDF_Destination) |
349 | HPDF_Page_CreateDestination (HPDF_Page page); |
350 | |
351 | |
352 | HPDF_EXPORT(HPDF_STATUS) |
353 | HPDF_Destination_SetXYZ (HPDF_Destination dst, |
354 | HPDF_REAL left, |
355 | HPDF_REAL top, |
356 | HPDF_REAL zoom); |
357 | |
358 | |
359 | HPDF_EXPORT(HPDF_STATUS) |
360 | HPDF_Destination_SetFit (HPDF_Destination dst); |
361 | |
362 | |
363 | HPDF_EXPORT(HPDF_STATUS) |
364 | HPDF_Destination_SetFitH (HPDF_Destination dst, |
365 | HPDF_REAL top); |
366 | |
367 | |
368 | HPDF_EXPORT(HPDF_STATUS) |
369 | HPDF_Destination_SetFitV (HPDF_Destination dst, |
370 | HPDF_REAL left); |
371 | |
372 | |
373 | HPDF_EXPORT(HPDF_STATUS) |
374 | HPDF_Destination_SetFitR (HPDF_Destination dst, |
375 | HPDF_REAL left, |
376 | HPDF_REAL bottom, |
377 | HPDF_REAL right, |
378 | HPDF_REAL top); |
379 | |
380 | |
381 | HPDF_EXPORT(HPDF_STATUS) |
382 | HPDF_Destination_SetFitB (HPDF_Destination dst); |
383 | |
384 | |
385 | HPDF_EXPORT(HPDF_STATUS) |
386 | HPDF_Destination_SetFitBH (HPDF_Destination dst, |
387 | HPDF_REAL top); |
388 | |
389 | |
390 | HPDF_EXPORT(HPDF_STATUS) |
391 | HPDF_Destination_SetFitBV (HPDF_Destination dst, |
392 | HPDF_REAL left); |
393 | |
394 | /*--------------------------------------------------------------------------*/ |
395 | /*----- encoder ------------------------------------------------------------*/ |
396 | |
397 | HPDF_EXPORT(HPDF_Encoder) |
398 | HPDF_GetEncoder (HPDF_Doc pdf, |
399 | const char *encoding_name); |
400 | |
401 | |
402 | HPDF_EXPORT(HPDF_Encoder) |
403 | HPDF_GetCurrentEncoder (HPDF_Doc pdf); |
404 | |
405 | |
406 | HPDF_EXPORT(HPDF_STATUS) |
407 | HPDF_SetCurrentEncoder (HPDF_Doc pdf, |
408 | const char *encoding_name); |
409 | |
410 | |
411 | HPDF_EXPORT(HPDF_EncoderType) |
412 | HPDF_Encoder_GetType (HPDF_Encoder encoder); |
413 | |
414 | |
415 | HPDF_EXPORT(HPDF_ByteType) |
416 | HPDF_Encoder_GetByteType (HPDF_Encoder encoder, |
417 | const char *text, |
418 | HPDF_UINT index); |
419 | |
420 | |
421 | HPDF_EXPORT(HPDF_UNICODE) |
422 | HPDF_Encoder_GetUnicode (HPDF_Encoder encoder, |
423 | HPDF_UINT16 code); |
424 | |
425 | |
426 | HPDF_EXPORT(HPDF_WritingMode) |
427 | HPDF_Encoder_GetWritingMode (HPDF_Encoder encoder); |
428 | |
429 | |
430 | HPDF_EXPORT(HPDF_STATUS) |
431 | HPDF_UseJPEncodings (HPDF_Doc pdf); |
432 | |
433 | |
434 | |
435 | HPDF_EXPORT(HPDF_STATUS) |
436 | HPDF_UseKREncodings (HPDF_Doc pdf); |
437 | |
438 | |
439 | |
440 | HPDF_EXPORT(HPDF_STATUS) |
441 | HPDF_UseCNSEncodings (HPDF_Doc pdf); |
442 | |
443 | |
444 | |
445 | HPDF_EXPORT(HPDF_STATUS) |
446 | HPDF_UseCNTEncodings (HPDF_Doc pdf); |
447 | |
448 | |
449 | HPDF_EXPORT(HPDF_STATUS) |
450 | HPDF_UseUTFEncodings (HPDF_Doc pdf); |
451 | |
452 | |
453 | /*--------------------------------------------------------------------------*/ |
454 | /*----- annotation ---------------------------------------------------------*/ |
455 | |
456 | HPDF_EXPORT(HPDF_Annotation) |
457 | HPDF_Page_Create3DAnnot (HPDF_Page page, |
458 | HPDF_Rect rect, |
459 | HPDF_U3D u3d); |
460 | |
461 | HPDF_EXPORT(HPDF_Annotation) |
462 | HPDF_Page_CreateTextAnnot (HPDF_Page page, |
463 | HPDF_Rect rect, |
464 | const char *text, |
465 | HPDF_Encoder encoder); |
466 | |
467 | HPDF_EXPORT(HPDF_Annotation) |
468 | HPDF_Page_CreateFreeTextAnnot (HPDF_Page page, |
469 | HPDF_Rect rect, |
470 | const char *text, |
471 | HPDF_Encoder encoder); |
472 | |
473 | HPDF_EXPORT(HPDF_Annotation) |
474 | HPDF_Page_CreateLineAnnot (HPDF_Page page, |
475 | const char *text, |
476 | HPDF_Encoder encoder); |
477 | |
478 | HPDF_EXPORT(HPDF_Annotation) |
479 | HPDF_Page_CreateLinkAnnot (HPDF_Page page, |
480 | HPDF_Rect rect, |
481 | HPDF_Destination dst); |
482 | |
483 | |
484 | HPDF_EXPORT(HPDF_Annotation) |
485 | HPDF_Page_CreateURILinkAnnot (HPDF_Page page, |
486 | HPDF_Rect rect, |
487 | const char *uri); |
488 | |
489 | |
490 | HPDF_Annotation |
491 | HPDF_Page_CreateTextMarkupAnnot (HPDF_Page page, |
492 | HPDF_Rect rect, |
493 | const char *text, |
494 | HPDF_Encoder encoder, |
495 | HPDF_AnnotType subType); |
496 | |
497 | HPDF_EXPORT(HPDF_Annotation) |
498 | HPDF_Page_CreateHighlightAnnot (HPDF_Page page, |
499 | HPDF_Rect rect, |
500 | const char *text, |
501 | HPDF_Encoder encoder); |
502 | |
503 | HPDF_EXPORT(HPDF_Annotation) |
504 | HPDF_Page_CreateUnderlineAnnot (HPDF_Page page, |
505 | HPDF_Rect rect, |
506 | const char *text, |
507 | HPDF_Encoder encoder); |
508 | |
509 | HPDF_EXPORT(HPDF_Annotation) |
510 | HPDF_Page_CreateSquigglyAnnot (HPDF_Page page, |
511 | HPDF_Rect rect, |
512 | const char *text, |
513 | HPDF_Encoder encoder); |
514 | |
515 | HPDF_EXPORT(HPDF_Annotation) |
516 | HPDF_Page_CreateStrikeOutAnnot (HPDF_Page page, |
517 | HPDF_Rect rect, |
518 | const char *text, |
519 | HPDF_Encoder encoder); |
520 | |
521 | HPDF_EXPORT(HPDF_Annotation) |
522 | ( HPDF_Page page, |
523 | HPDF_Rect rect, |
524 | HPDF_Annotation parent); |
525 | |
526 | HPDF_EXPORT(HPDF_Annotation) |
527 | HPDF_Page_CreateStampAnnot ( HPDF_Page page, |
528 | HPDF_Rect rect, |
529 | HPDF_StampAnnotName name, |
530 | const char* text, |
531 | HPDF_Encoder encoder); |
532 | |
533 | HPDF_EXPORT(HPDF_Annotation) |
534 | HPDF_Page_CreateProjectionAnnot(HPDF_Page page, |
535 | HPDF_Rect rect, |
536 | const char* text, |
537 | HPDF_Encoder encoder); |
538 | |
539 | HPDF_EXPORT(HPDF_Annotation) |
540 | HPDF_Page_CreateSquareAnnot (HPDF_Page page, |
541 | HPDF_Rect rect, |
542 | const char *text, |
543 | HPDF_Encoder encoder); |
544 | |
545 | HPDF_EXPORT(HPDF_Annotation) |
546 | HPDF_Page_CreateCircleAnnot (HPDF_Page page, |
547 | HPDF_Rect rect, |
548 | const char *text, |
549 | HPDF_Encoder encoder); |
550 | |
551 | HPDF_EXPORT(HPDF_STATUS) |
552 | HPDF_LinkAnnot_SetHighlightMode (HPDF_Annotation annot, |
553 | HPDF_AnnotHighlightMode mode); |
554 | |
555 | |
556 | HPDF_EXPORT(HPDF_STATUS) |
557 | HPDF_LinkAnnot_SetBorderStyle (HPDF_Annotation annot, |
558 | HPDF_REAL width, |
559 | HPDF_UINT16 dash_on, |
560 | HPDF_UINT16 dash_off); |
561 | |
562 | |
563 | HPDF_EXPORT(HPDF_STATUS) |
564 | HPDF_TextAnnot_SetIcon (HPDF_Annotation annot, |
565 | HPDF_AnnotIcon icon); |
566 | |
567 | |
568 | HPDF_EXPORT(HPDF_STATUS) |
569 | HPDF_TextAnnot_SetOpened (HPDF_Annotation annot, |
570 | HPDF_BOOL opened); |
571 | |
572 | HPDF_EXPORT(HPDF_STATUS) |
573 | HPDF_Annot_SetRGBColor (HPDF_Annotation annot, HPDF_RGBColor color); |
574 | |
575 | HPDF_EXPORT(HPDF_STATUS) |
576 | HPDF_Annot_SetCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor color); |
577 | |
578 | HPDF_EXPORT(HPDF_STATUS) |
579 | HPDF_Annot_SetGrayColor (HPDF_Annotation annot, HPDF_REAL color); |
580 | |
581 | HPDF_EXPORT(HPDF_STATUS) |
582 | HPDF_Annot_SetNoColor (HPDF_Annotation annot); |
583 | |
584 | HPDF_EXPORT(HPDF_STATUS) |
585 | HPDF_MarkupAnnot_SetTitle (HPDF_Annotation annot, const char* name); |
586 | |
587 | HPDF_EXPORT(HPDF_STATUS) |
588 | HPDF_MarkupAnnot_SetSubject (HPDF_Annotation annot, const char* name); |
589 | |
590 | HPDF_EXPORT(HPDF_STATUS) |
591 | HPDF_MarkupAnnot_SetCreationDate (HPDF_Annotation annot, HPDF_Date value); |
592 | |
593 | HPDF_EXPORT(HPDF_STATUS) |
594 | HPDF_MarkupAnnot_SetTransparency (HPDF_Annotation annot, HPDF_REAL value); |
595 | |
596 | HPDF_EXPORT(HPDF_STATUS) |
597 | HPDF_MarkupAnnot_SetIntent (HPDF_Annotation annot, HPDF_AnnotIntent intent); |
598 | |
599 | HPDF_EXPORT(HPDF_STATUS) |
600 | (HPDF_Annotation annot, HPDF_Annotation ); |
601 | |
602 | HPDF_EXPORT(HPDF_STATUS) |
603 | HPDF_MarkupAnnot_SetRectDiff (HPDF_Annotation annot, HPDF_Rect rect); /* RD entry */ |
604 | |
605 | HPDF_EXPORT(HPDF_STATUS) |
606 | HPDF_MarkupAnnot_SetCloudEffect (HPDF_Annotation annot, HPDF_INT cloudIntensity); /* BE entry */ |
607 | |
608 | HPDF_EXPORT(HPDF_STATUS) |
609 | HPDF_MarkupAnnot_SetInteriorRGBColor (HPDF_Annotation annot, HPDF_RGBColor color); /* IC with RGB entry */ |
610 | |
611 | HPDF_EXPORT(HPDF_STATUS) |
612 | HPDF_MarkupAnnot_SetInteriorCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor color); /* IC with CMYK entry */ |
613 | |
614 | HPDF_EXPORT(HPDF_STATUS) |
615 | HPDF_MarkupAnnot_SetInteriorGrayColor (HPDF_Annotation annot, HPDF_REAL color); /* IC with Gray entry */ |
616 | |
617 | HPDF_EXPORT(HPDF_STATUS) |
618 | HPDF_MarkupAnnot_SetInteriorTransparent (HPDF_Annotation annot); /* IC with No Color entry */ |
619 | |
620 | HPDF_EXPORT(HPDF_STATUS) |
621 | HPDF_TextMarkupAnnot_SetQuadPoints ( HPDF_Annotation annot, HPDF_Point lb, HPDF_Point rb, HPDF_Point rt, HPDF_Point lt); /* l-left, r-right, b-bottom, t-top positions */ |
622 | |
623 | HPDF_EXPORT(HPDF_STATUS) |
624 | HPDF_Annot_Set3DView ( HPDF_MMgr mmgr, |
625 | HPDF_Annotation annot, |
626 | HPDF_Annotation annot3d, |
627 | HPDF_Dict view); |
628 | |
629 | HPDF_EXPORT(HPDF_STATUS) |
630 | (HPDF_Annotation annot, |
631 | HPDF_BOOL opened); |
632 | |
633 | HPDF_EXPORT(HPDF_STATUS) |
634 | HPDF_FreeTextAnnot_SetLineEndingStyle (HPDF_Annotation annot, HPDF_LineAnnotEndingStyle startStyle, HPDF_LineAnnotEndingStyle endStyle); |
635 | |
636 | HPDF_EXPORT(HPDF_STATUS) |
637 | HPDF_FreeTextAnnot_Set3PointCalloutLine (HPDF_Annotation annot, HPDF_Point startPoint, HPDF_Point kneePoint, HPDF_Point endPoint); /* Callout line will be in default user space */ |
638 | |
639 | HPDF_EXPORT(HPDF_STATUS) |
640 | HPDF_FreeTextAnnot_Set2PointCalloutLine (HPDF_Annotation annot, HPDF_Point startPoint, HPDF_Point endPoint); /* Callout line will be in default user space */ |
641 | |
642 | HPDF_EXPORT(HPDF_STATUS) |
643 | HPDF_FreeTextAnnot_SetDefaultStyle (HPDF_Annotation annot, const char* style); |
644 | |
645 | HPDF_EXPORT(HPDF_STATUS) |
646 | HPDF_LineAnnot_SetPosition (HPDF_Annotation annot, |
647 | HPDF_Point startPoint, HPDF_LineAnnotEndingStyle startStyle, |
648 | HPDF_Point endPoint, HPDF_LineAnnotEndingStyle endStyle); |
649 | |
650 | HPDF_EXPORT(HPDF_STATUS) |
651 | HPDF_LineAnnot_SetLeader (HPDF_Annotation annot, HPDF_INT leaderLen, HPDF_INT leaderExtLen, HPDF_INT leaderOffsetLen); |
652 | |
653 | HPDF_EXPORT(HPDF_STATUS) |
654 | HPDF_LineAnnot_SetCaption (HPDF_Annotation annot, HPDF_BOOL showCaption, HPDF_LineAnnotCapPosition position, HPDF_INT horzOffset, HPDF_INT vertOffset); |
655 | |
656 | HPDF_EXPORT(HPDF_STATUS) |
657 | HPDF_Annotation_SetBorderStyle (HPDF_Annotation annot, |
658 | HPDF_BSSubtype subtype, |
659 | HPDF_REAL width, |
660 | HPDF_UINT16 dash_on, |
661 | HPDF_UINT16 dash_off, |
662 | HPDF_UINT16 dash_phase); |
663 | |
664 | HPDF_EXPORT(HPDF_STATUS) |
665 | HPDF_ProjectionAnnot_SetExData(HPDF_Annotation annot, HPDF_ExData exdata); |
666 | |
667 | |
668 | /*--------------------------------------------------------------------------*/ |
669 | /*----- 3D Measure ---------------------------------------------------------*/ |
670 | HPDF_EXPORT(HPDF_3DMeasure) |
671 | HPDF_Page_Create3DC3DMeasure(HPDF_Page page, |
672 | HPDF_Point3D firstanchorpoint, |
673 | HPDF_Point3D textanchorpoint |
674 | ); |
675 | |
676 | HPDF_EXPORT(HPDF_3DMeasure) |
677 | HPDF_Page_CreatePD33DMeasure(HPDF_Page page, |
678 | HPDF_Point3D annotationPlaneNormal, |
679 | HPDF_Point3D firstAnchorPoint, |
680 | HPDF_Point3D secondAnchorPoint, |
681 | HPDF_Point3D leaderLinesDirection, |
682 | HPDF_Point3D measurementValuePoint, |
683 | HPDF_Point3D textYDirection, |
684 | HPDF_REAL value, |
685 | const char* unitsString |
686 | ); |
687 | |
688 | HPDF_EXPORT(HPDF_STATUS) |
689 | HPDF_3DMeasure_SetName(HPDF_3DMeasure measure, |
690 | const char* name); |
691 | |
692 | HPDF_EXPORT(HPDF_STATUS) |
693 | HPDF_3DMeasure_SetColor(HPDF_3DMeasure measure, |
694 | HPDF_RGBColor color); |
695 | |
696 | HPDF_EXPORT(HPDF_STATUS) |
697 | HPDF_3DMeasure_SetTextSize(HPDF_3DMeasure measure, |
698 | HPDF_REAL textsize); |
699 | |
700 | HPDF_EXPORT(HPDF_STATUS) |
701 | HPDF_3DC3DMeasure_SetTextBoxSize(HPDF_3DMeasure measure, |
702 | HPDF_INT32 x, |
703 | HPDF_INT32 y); |
704 | |
705 | HPDF_EXPORT(HPDF_STATUS) |
706 | HPDF_3DC3DMeasure_SetText(HPDF_3DMeasure measure, |
707 | const char* text, |
708 | HPDF_Encoder encoder); |
709 | |
710 | HPDF_EXPORT(HPDF_STATUS) |
711 | HPDF_3DC3DMeasure_SetProjectionAnotation(HPDF_3DMeasure measure, |
712 | HPDF_Annotation projectionanotation); |
713 | |
714 | /*--------------------------------------------------------------------------*/ |
715 | /*----- External Data ---------------------------------------------------------*/ |
716 | |
717 | HPDF_EXPORT(HPDF_ExData) |
718 | HPDF_Page_Create3DAnnotExData(HPDF_Page page ); |
719 | |
720 | HPDF_EXPORT(HPDF_STATUS) |
721 | HPDF_3DAnnotExData_Set3DMeasurement(HPDF_ExData exdata, HPDF_3DMeasure measure); |
722 | |
723 | /*--------------------------------------------------------------------------*/ |
724 | /*--------------------------------------------------------------------------*/ |
725 | /*----- 3D View ---------------------------------------------------------*/ |
726 | |
727 | HPDF_EXPORT(HPDF_Dict) |
728 | HPDF_Page_Create3DView (HPDF_Page page, |
729 | HPDF_U3D u3d, |
730 | HPDF_Annotation annot3d, |
731 | const char *name); |
732 | |
733 | HPDF_EXPORT(HPDF_STATUS) |
734 | HPDF_3DView_Add3DC3DMeasure(HPDF_Dict view, |
735 | HPDF_3DMeasure measure); |
736 | |
737 | /*--------------------------------------------------------------------------*/ |
738 | /*----- image data ---------------------------------------------------------*/ |
739 | |
740 | HPDF_EXPORT(HPDF_Image) |
741 | HPDF_LoadPngImageFromMem (HPDF_Doc pdf, |
742 | const HPDF_BYTE *buffer, |
743 | HPDF_UINT size); |
744 | |
745 | HPDF_EXPORT(HPDF_Image) |
746 | HPDF_LoadPngImageFromFile (HPDF_Doc pdf, |
747 | const char *filename); |
748 | |
749 | |
750 | HPDF_EXPORT(HPDF_Image) |
751 | HPDF_LoadPngImageFromFile2 (HPDF_Doc pdf, |
752 | const char *filename); |
753 | |
754 | |
755 | HPDF_EXPORT(HPDF_Image) |
756 | HPDF_LoadJpegImageFromFile (HPDF_Doc pdf, |
757 | const char *filename); |
758 | |
759 | HPDF_EXPORT(HPDF_Image) |
760 | HPDF_LoadJpegImageFromMem (HPDF_Doc pdf, |
761 | const HPDF_BYTE *buffer, |
762 | HPDF_UINT size); |
763 | |
764 | HPDF_EXPORT(HPDF_Image) |
765 | HPDF_LoadU3DFromFile (HPDF_Doc pdf, |
766 | const char *filename); |
767 | |
768 | HPDF_EXPORT(HPDF_Image) |
769 | HPDF_LoadU3DFromMem (HPDF_Doc pdf, |
770 | const HPDF_BYTE *buffer, |
771 | HPDF_UINT size); |
772 | |
773 | HPDF_EXPORT(HPDF_Image) |
774 | HPDF_Image_LoadRaw1BitImageFromMem (HPDF_Doc pdf, |
775 | const HPDF_BYTE *buf, |
776 | HPDF_UINT width, |
777 | HPDF_UINT height, |
778 | HPDF_UINT line_width, |
779 | HPDF_BOOL black_is1, |
780 | HPDF_BOOL top_is_first); |
781 | |
782 | |
783 | HPDF_EXPORT(HPDF_Image) |
784 | HPDF_LoadRawImageFromFile (HPDF_Doc pdf, |
785 | const char *filename, |
786 | HPDF_UINT width, |
787 | HPDF_UINT height, |
788 | HPDF_ColorSpace color_space); |
789 | |
790 | |
791 | HPDF_EXPORT(HPDF_Image) |
792 | HPDF_LoadRawImageFromMem (HPDF_Doc pdf, |
793 | const HPDF_BYTE *buf, |
794 | HPDF_UINT width, |
795 | HPDF_UINT height, |
796 | HPDF_ColorSpace color_space, |
797 | HPDF_UINT bits_per_component); |
798 | |
799 | HPDF_EXPORT(HPDF_STATUS) |
800 | HPDF_Image_AddSMask (HPDF_Image image, |
801 | HPDF_Image smask); |
802 | |
803 | HPDF_EXPORT(HPDF_Point) |
804 | HPDF_Image_GetSize (HPDF_Image image); |
805 | |
806 | |
807 | HPDF_EXPORT(HPDF_STATUS) |
808 | HPDF_Image_GetSize2 (HPDF_Image image, HPDF_Point *size); |
809 | |
810 | |
811 | HPDF_EXPORT(HPDF_UINT) |
812 | HPDF_Image_GetWidth (HPDF_Image image); |
813 | |
814 | |
815 | HPDF_EXPORT(HPDF_UINT) |
816 | HPDF_Image_GetHeight (HPDF_Image image); |
817 | |
818 | |
819 | HPDF_EXPORT(HPDF_UINT) |
820 | HPDF_Image_GetBitsPerComponent (HPDF_Image image); |
821 | |
822 | |
823 | HPDF_EXPORT(const char*) |
824 | HPDF_Image_GetColorSpace (HPDF_Image image); |
825 | |
826 | |
827 | HPDF_EXPORT(HPDF_STATUS) |
828 | HPDF_Image_SetColorMask (HPDF_Image image, |
829 | HPDF_UINT rmin, |
830 | HPDF_UINT rmax, |
831 | HPDF_UINT gmin, |
832 | HPDF_UINT gmax, |
833 | HPDF_UINT bmin, |
834 | HPDF_UINT bmax); |
835 | |
836 | |
837 | HPDF_EXPORT(HPDF_STATUS) |
838 | HPDF_Image_SetMaskImage (HPDF_Image image, |
839 | HPDF_Image mask_image); |
840 | |
841 | |
842 | /*--------------------------------------------------------------------------*/ |
843 | /*----- info dictionary ----------------------------------------------------*/ |
844 | |
845 | |
846 | HPDF_EXPORT(HPDF_STATUS) |
847 | HPDF_SetInfoAttr (HPDF_Doc pdf, |
848 | HPDF_InfoType type, |
849 | const char *value); |
850 | |
851 | |
852 | HPDF_EXPORT(const char*) |
853 | HPDF_GetInfoAttr (HPDF_Doc pdf, |
854 | HPDF_InfoType type); |
855 | |
856 | |
857 | HPDF_EXPORT(HPDF_STATUS) |
858 | HPDF_SetInfoDateAttr (HPDF_Doc pdf, |
859 | HPDF_InfoType type, |
860 | HPDF_Date value); |
861 | |
862 | |
863 | /*--------------------------------------------------------------------------*/ |
864 | /*----- encryption ---------------------------------------------------------*/ |
865 | |
866 | HPDF_EXPORT(HPDF_STATUS) |
867 | HPDF_SetPassword (HPDF_Doc pdf, |
868 | const char *owner_passwd, |
869 | const char *user_passwd); |
870 | |
871 | |
872 | HPDF_EXPORT(HPDF_STATUS) |
873 | HPDF_SetPermission (HPDF_Doc pdf, |
874 | HPDF_UINT permission); |
875 | |
876 | |
877 | HPDF_EXPORT(HPDF_STATUS) |
878 | HPDF_SetEncryptionMode (HPDF_Doc pdf, |
879 | HPDF_EncryptMode mode, |
880 | HPDF_UINT key_len); |
881 | |
882 | |
883 | /*--------------------------------------------------------------------------*/ |
884 | /*----- compression --------------------------------------------------------*/ |
885 | |
886 | HPDF_EXPORT(HPDF_STATUS) |
887 | HPDF_SetCompressionMode (HPDF_Doc pdf, |
888 | HPDF_UINT mode); |
889 | |
890 | |
891 | /*--------------------------------------------------------------------------*/ |
892 | /*----- font ---------------------------------------------------------------*/ |
893 | |
894 | HPDF_EXPORT(const char*) |
895 | HPDF_Font_GetFontName (HPDF_Font font); |
896 | |
897 | |
898 | HPDF_EXPORT(const char*) |
899 | HPDF_Font_GetEncodingName (HPDF_Font font); |
900 | |
901 | |
902 | HPDF_EXPORT(HPDF_INT) |
903 | HPDF_Font_GetUnicodeWidth (HPDF_Font font, |
904 | HPDF_UNICODE code); |
905 | |
906 | HPDF_EXPORT(HPDF_Box) |
907 | HPDF_Font_GetBBox (HPDF_Font font); |
908 | |
909 | |
910 | HPDF_EXPORT(HPDF_INT) |
911 | HPDF_Font_GetAscent (HPDF_Font font); |
912 | |
913 | |
914 | HPDF_EXPORT(HPDF_INT) |
915 | HPDF_Font_GetDescent (HPDF_Font font); |
916 | |
917 | |
918 | HPDF_EXPORT(HPDF_UINT) |
919 | HPDF_Font_GetXHeight (HPDF_Font font); |
920 | |
921 | |
922 | HPDF_EXPORT(HPDF_UINT) |
923 | HPDF_Font_GetCapHeight (HPDF_Font font); |
924 | |
925 | |
926 | HPDF_EXPORT(HPDF_TextWidth) |
927 | HPDF_Font_TextWidth (HPDF_Font font, |
928 | const HPDF_BYTE *text, |
929 | HPDF_UINT len); |
930 | |
931 | |
932 | HPDF_EXPORT(HPDF_UINT) |
933 | HPDF_Font_MeasureText (HPDF_Font font, |
934 | const HPDF_BYTE *text, |
935 | HPDF_UINT len, |
936 | HPDF_REAL width, |
937 | HPDF_REAL font_size, |
938 | HPDF_REAL char_space, |
939 | HPDF_REAL word_space, |
940 | HPDF_BOOL wordwrap, |
941 | HPDF_REAL *real_width); |
942 | |
943 | |
944 | /*--------------------------------------------------------------------------*/ |
945 | /*----- attachements -------------------------------------------------------*/ |
946 | |
947 | HPDF_EXPORT(HPDF_EmbeddedFile) |
948 | HPDF_AttachFile (HPDF_Doc pdf, |
949 | const char *file); |
950 | |
951 | |
952 | /*--------------------------------------------------------------------------*/ |
953 | /*----- extended graphics state --------------------------------------------*/ |
954 | |
955 | HPDF_EXPORT(HPDF_ExtGState) |
956 | HPDF_CreateExtGState (HPDF_Doc pdf); |
957 | |
958 | |
959 | HPDF_EXPORT(HPDF_STATUS) |
960 | HPDF_ExtGState_SetAlphaStroke (HPDF_ExtGState ext_gstate, |
961 | HPDF_REAL value); |
962 | |
963 | |
964 | HPDF_EXPORT(HPDF_STATUS) |
965 | HPDF_ExtGState_SetAlphaFill (HPDF_ExtGState ext_gstate, |
966 | HPDF_REAL value); |
967 | |
968 | |
969 | |
970 | HPDF_EXPORT(HPDF_STATUS) |
971 | HPDF_ExtGState_SetBlendMode (HPDF_ExtGState ext_gstate, |
972 | HPDF_BlendMode mode); |
973 | |
974 | |
975 | /*--------------------------------------------------------------------------*/ |
976 | /*--------------------------------------------------------------------------*/ |
977 | |
978 | HPDF_EXPORT(HPDF_REAL) |
979 | HPDF_Page_TextWidth (HPDF_Page page, |
980 | const char *text); |
981 | |
982 | |
983 | HPDF_EXPORT(HPDF_UINT) |
984 | HPDF_Page_MeasureText (HPDF_Page page, |
985 | const char *text, |
986 | HPDF_REAL width, |
987 | HPDF_BOOL wordwrap, |
988 | HPDF_REAL *real_width); |
989 | |
990 | |
991 | HPDF_EXPORT(HPDF_REAL) |
992 | HPDF_Page_GetWidth (HPDF_Page page); |
993 | |
994 | |
995 | HPDF_EXPORT(HPDF_REAL) |
996 | HPDF_Page_GetHeight (HPDF_Page page); |
997 | |
998 | |
999 | HPDF_EXPORT(HPDF_UINT16) |
1000 | HPDF_Page_GetGMode (HPDF_Page page); |
1001 | |
1002 | |
1003 | HPDF_EXPORT(HPDF_Point) |
1004 | HPDF_Page_GetCurrentPos (HPDF_Page page); |
1005 | |
1006 | |
1007 | HPDF_EXPORT(HPDF_STATUS) |
1008 | HPDF_Page_GetCurrentPos2 (HPDF_Page page, |
1009 | HPDF_Point *pos); |
1010 | |
1011 | |
1012 | HPDF_EXPORT(HPDF_Point) |
1013 | HPDF_Page_GetCurrentTextPos (HPDF_Page page); |
1014 | |
1015 | |
1016 | HPDF_EXPORT(HPDF_STATUS) |
1017 | HPDF_Page_GetCurrentTextPos2 (HPDF_Page page, |
1018 | HPDF_Point *pos); |
1019 | |
1020 | |
1021 | HPDF_EXPORT(HPDF_Font) |
1022 | HPDF_Page_GetCurrentFont (HPDF_Page page); |
1023 | |
1024 | |
1025 | HPDF_EXPORT(HPDF_REAL) |
1026 | HPDF_Page_GetCurrentFontSize (HPDF_Page page); |
1027 | |
1028 | |
1029 | HPDF_EXPORT(HPDF_TransMatrix) |
1030 | HPDF_Page_GetTransMatrix (HPDF_Page page); |
1031 | |
1032 | |
1033 | HPDF_EXPORT(HPDF_REAL) |
1034 | HPDF_Page_GetLineWidth (HPDF_Page page); |
1035 | |
1036 | |
1037 | HPDF_EXPORT(HPDF_LineCap) |
1038 | HPDF_Page_GetLineCap (HPDF_Page page); |
1039 | |
1040 | |
1041 | HPDF_EXPORT(HPDF_LineJoin) |
1042 | HPDF_Page_GetLineJoin (HPDF_Page page); |
1043 | |
1044 | |
1045 | HPDF_EXPORT(HPDF_REAL) |
1046 | HPDF_Page_GetMiterLimit (HPDF_Page page); |
1047 | |
1048 | |
1049 | HPDF_EXPORT(HPDF_DashMode) |
1050 | HPDF_Page_GetDash (HPDF_Page page); |
1051 | |
1052 | |
1053 | HPDF_EXPORT(HPDF_REAL) |
1054 | HPDF_Page_GetFlat (HPDF_Page page); |
1055 | |
1056 | |
1057 | HPDF_EXPORT(HPDF_REAL) |
1058 | HPDF_Page_GetCharSpace (HPDF_Page page); |
1059 | |
1060 | |
1061 | HPDF_EXPORT(HPDF_REAL) |
1062 | HPDF_Page_GetWordSpace (HPDF_Page page); |
1063 | |
1064 | |
1065 | HPDF_EXPORT(HPDF_REAL) |
1066 | HPDF_Page_GetHorizontalScalling (HPDF_Page page); |
1067 | |
1068 | |
1069 | HPDF_EXPORT(HPDF_REAL) |
1070 | HPDF_Page_GetTextLeading (HPDF_Page page); |
1071 | |
1072 | |
1073 | HPDF_EXPORT(HPDF_TextRenderingMode) |
1074 | HPDF_Page_GetTextRenderingMode (HPDF_Page page); |
1075 | |
1076 | |
1077 | /* This function is obsolete. Use HPDF_Page_GetTextRise. */ |
1078 | HPDF_EXPORT(HPDF_REAL) |
1079 | (HPDF_Page page); |
1080 | |
1081 | |
1082 | HPDF_EXPORT(HPDF_REAL) |
1083 | HPDF_Page_GetTextRise (HPDF_Page page); |
1084 | |
1085 | |
1086 | HPDF_EXPORT(HPDF_RGBColor) |
1087 | HPDF_Page_GetRGBFill (HPDF_Page page); |
1088 | |
1089 | |
1090 | HPDF_EXPORT(HPDF_RGBColor) |
1091 | HPDF_Page_GetRGBStroke (HPDF_Page page); |
1092 | |
1093 | |
1094 | HPDF_EXPORT(HPDF_CMYKColor) |
1095 | HPDF_Page_GetCMYKFill (HPDF_Page page); |
1096 | |
1097 | |
1098 | HPDF_EXPORT(HPDF_CMYKColor) |
1099 | HPDF_Page_GetCMYKStroke (HPDF_Page page); |
1100 | |
1101 | |
1102 | HPDF_EXPORT(HPDF_REAL) |
1103 | HPDF_Page_GetGrayFill (HPDF_Page page); |
1104 | |
1105 | |
1106 | HPDF_EXPORT(HPDF_REAL) |
1107 | HPDF_Page_GetGrayStroke (HPDF_Page page); |
1108 | |
1109 | |
1110 | HPDF_EXPORT(HPDF_ColorSpace) |
1111 | HPDF_Page_GetStrokingColorSpace (HPDF_Page page); |
1112 | |
1113 | |
1114 | HPDF_EXPORT(HPDF_ColorSpace) |
1115 | HPDF_Page_GetFillingColorSpace (HPDF_Page page); |
1116 | |
1117 | |
1118 | HPDF_EXPORT(HPDF_TransMatrix) |
1119 | HPDF_Page_GetTextMatrix (HPDF_Page page); |
1120 | |
1121 | |
1122 | HPDF_EXPORT(HPDF_UINT) |
1123 | HPDF_Page_GetGStateDepth (HPDF_Page page); |
1124 | |
1125 | |
1126 | /*--------------------------------------------------------------------------*/ |
1127 | /*----- GRAPHICS OPERATORS -------------------------------------------------*/ |
1128 | |
1129 | |
1130 | /*--- General graphics state ---------------------------------------------*/ |
1131 | |
1132 | /* w */ |
1133 | HPDF_EXPORT(HPDF_STATUS) |
1134 | HPDF_Page_SetLineWidth (HPDF_Page page, |
1135 | HPDF_REAL line_width); |
1136 | |
1137 | /* J */ |
1138 | HPDF_EXPORT(HPDF_STATUS) |
1139 | HPDF_Page_SetLineCap (HPDF_Page page, |
1140 | HPDF_LineCap line_cap); |
1141 | |
1142 | /* j */ |
1143 | HPDF_EXPORT(HPDF_STATUS) |
1144 | HPDF_Page_SetLineJoin (HPDF_Page page, |
1145 | HPDF_LineJoin line_join); |
1146 | |
1147 | /* M */ |
1148 | HPDF_EXPORT(HPDF_STATUS) |
1149 | HPDF_Page_SetMiterLimit (HPDF_Page page, |
1150 | HPDF_REAL miter_limit); |
1151 | |
1152 | /* d */ |
1153 | HPDF_EXPORT(HPDF_STATUS) |
1154 | HPDF_Page_SetDash (HPDF_Page page, |
1155 | const HPDF_UINT16 *dash_ptn, |
1156 | HPDF_UINT num_param, |
1157 | HPDF_UINT phase); |
1158 | |
1159 | |
1160 | |
1161 | /* ri --not implemented yet */ |
1162 | |
1163 | /* i */ |
1164 | HPDF_EXPORT(HPDF_STATUS) |
1165 | HPDF_Page_SetFlat (HPDF_Page page, |
1166 | HPDF_REAL flatness); |
1167 | |
1168 | /* gs */ |
1169 | |
1170 | HPDF_EXPORT(HPDF_STATUS) |
1171 | HPDF_Page_SetExtGState (HPDF_Page page, |
1172 | HPDF_ExtGState ext_gstate); |
1173 | |
1174 | |
1175 | /*--- Special graphic state operator --------------------------------------*/ |
1176 | |
1177 | /* q */ |
1178 | HPDF_EXPORT(HPDF_STATUS) |
1179 | HPDF_Page_GSave (HPDF_Page page); |
1180 | |
1181 | /* Q */ |
1182 | HPDF_EXPORT(HPDF_STATUS) |
1183 | HPDF_Page_GRestore (HPDF_Page page); |
1184 | |
1185 | /* cm */ |
1186 | HPDF_EXPORT(HPDF_STATUS) |
1187 | HPDF_Page_Concat (HPDF_Page page, |
1188 | HPDF_REAL a, |
1189 | HPDF_REAL b, |
1190 | HPDF_REAL c, |
1191 | HPDF_REAL d, |
1192 | HPDF_REAL x, |
1193 | HPDF_REAL y); |
1194 | |
1195 | /*--- Path construction operator ------------------------------------------*/ |
1196 | |
1197 | /* m */ |
1198 | HPDF_EXPORT(HPDF_STATUS) |
1199 | HPDF_Page_MoveTo (HPDF_Page page, |
1200 | HPDF_REAL x, |
1201 | HPDF_REAL y); |
1202 | |
1203 | /* l */ |
1204 | HPDF_EXPORT(HPDF_STATUS) |
1205 | HPDF_Page_LineTo (HPDF_Page page, |
1206 | HPDF_REAL x, |
1207 | HPDF_REAL y); |
1208 | |
1209 | /* c */ |
1210 | HPDF_EXPORT(HPDF_STATUS) |
1211 | HPDF_Page_CurveTo (HPDF_Page page, |
1212 | HPDF_REAL x1, |
1213 | HPDF_REAL y1, |
1214 | HPDF_REAL x2, |
1215 | HPDF_REAL y2, |
1216 | HPDF_REAL x3, |
1217 | HPDF_REAL y3); |
1218 | |
1219 | /* v */ |
1220 | HPDF_EXPORT(HPDF_STATUS) |
1221 | HPDF_Page_CurveTo2 (HPDF_Page page, |
1222 | HPDF_REAL x2, |
1223 | HPDF_REAL y2, |
1224 | HPDF_REAL x3, |
1225 | HPDF_REAL y3); |
1226 | |
1227 | /* y */ |
1228 | HPDF_EXPORT(HPDF_STATUS) |
1229 | HPDF_Page_CurveTo3 (HPDF_Page page, |
1230 | HPDF_REAL x1, |
1231 | HPDF_REAL y1, |
1232 | HPDF_REAL x3, |
1233 | HPDF_REAL y3); |
1234 | |
1235 | /* h */ |
1236 | HPDF_EXPORT(HPDF_STATUS) |
1237 | HPDF_Page_ClosePath (HPDF_Page page); |
1238 | |
1239 | /* re */ |
1240 | HPDF_EXPORT(HPDF_STATUS) |
1241 | HPDF_Page_Rectangle (HPDF_Page page, |
1242 | HPDF_REAL x, |
1243 | HPDF_REAL y, |
1244 | HPDF_REAL width, |
1245 | HPDF_REAL height); |
1246 | |
1247 | |
1248 | /*--- Path painting operator ---------------------------------------------*/ |
1249 | |
1250 | /* S */ |
1251 | HPDF_EXPORT(HPDF_STATUS) |
1252 | HPDF_Page_Stroke (HPDF_Page page); |
1253 | |
1254 | /* s */ |
1255 | HPDF_EXPORT(HPDF_STATUS) |
1256 | HPDF_Page_ClosePathStroke (HPDF_Page page); |
1257 | |
1258 | /* f */ |
1259 | HPDF_EXPORT(HPDF_STATUS) |
1260 | HPDF_Page_Fill (HPDF_Page page); |
1261 | |
1262 | /* f* */ |
1263 | HPDF_EXPORT(HPDF_STATUS) |
1264 | HPDF_Page_Eofill (HPDF_Page page); |
1265 | |
1266 | /* B */ |
1267 | HPDF_EXPORT(HPDF_STATUS) |
1268 | HPDF_Page_FillStroke (HPDF_Page page); |
1269 | |
1270 | /* B* */ |
1271 | HPDF_EXPORT(HPDF_STATUS) |
1272 | HPDF_Page_EofillStroke (HPDF_Page page); |
1273 | |
1274 | /* b */ |
1275 | HPDF_EXPORT(HPDF_STATUS) |
1276 | HPDF_Page_ClosePathFillStroke (HPDF_Page page); |
1277 | |
1278 | /* b* */ |
1279 | HPDF_EXPORT(HPDF_STATUS) |
1280 | HPDF_Page_ClosePathEofillStroke (HPDF_Page page); |
1281 | |
1282 | /* n */ |
1283 | HPDF_EXPORT(HPDF_STATUS) |
1284 | HPDF_Page_EndPath (HPDF_Page page); |
1285 | |
1286 | |
1287 | /*--- Clipping paths operator --------------------------------------------*/ |
1288 | |
1289 | /* W */ |
1290 | HPDF_EXPORT(HPDF_STATUS) |
1291 | HPDF_Page_Clip (HPDF_Page page); |
1292 | |
1293 | /* W* */ |
1294 | HPDF_EXPORT(HPDF_STATUS) |
1295 | HPDF_Page_Eoclip (HPDF_Page page); |
1296 | |
1297 | |
1298 | /*--- Text object operator -----------------------------------------------*/ |
1299 | |
1300 | /* BT */ |
1301 | HPDF_EXPORT(HPDF_STATUS) |
1302 | HPDF_Page_BeginText (HPDF_Page page); |
1303 | |
1304 | /* ET */ |
1305 | HPDF_EXPORT(HPDF_STATUS) |
1306 | HPDF_Page_EndText (HPDF_Page page); |
1307 | |
1308 | /*--- Text state ---------------------------------------------------------*/ |
1309 | |
1310 | /* Tc */ |
1311 | HPDF_EXPORT(HPDF_STATUS) |
1312 | HPDF_Page_SetCharSpace (HPDF_Page page, |
1313 | HPDF_REAL value); |
1314 | |
1315 | /* Tw */ |
1316 | HPDF_EXPORT(HPDF_STATUS) |
1317 | HPDF_Page_SetWordSpace (HPDF_Page page, |
1318 | HPDF_REAL value); |
1319 | |
1320 | /* Tz */ |
1321 | HPDF_EXPORT(HPDF_STATUS) |
1322 | HPDF_Page_SetHorizontalScalling (HPDF_Page page, |
1323 | HPDF_REAL value); |
1324 | |
1325 | /* TL */ |
1326 | HPDF_EXPORT(HPDF_STATUS) |
1327 | HPDF_Page_SetTextLeading (HPDF_Page page, |
1328 | HPDF_REAL value); |
1329 | |
1330 | /* Tf */ |
1331 | HPDF_EXPORT(HPDF_STATUS) |
1332 | HPDF_Page_SetFontAndSize (HPDF_Page page, |
1333 | HPDF_Font font, |
1334 | HPDF_REAL size); |
1335 | |
1336 | /* Tr */ |
1337 | HPDF_EXPORT(HPDF_STATUS) |
1338 | HPDF_Page_SetTextRenderingMode (HPDF_Page page, |
1339 | HPDF_TextRenderingMode mode); |
1340 | |
1341 | /* Ts */ |
1342 | HPDF_EXPORT(HPDF_STATUS) |
1343 | HPDF_Page_SetTextRise (HPDF_Page page, |
1344 | HPDF_REAL value); |
1345 | |
1346 | /* This function is obsolete. Use HPDF_Page_SetTextRise. */ |
1347 | HPDF_EXPORT(HPDF_STATUS) |
1348 | (HPDF_Page page, |
1349 | HPDF_REAL value); |
1350 | |
1351 | /*--- Text positioning ---------------------------------------------------*/ |
1352 | |
1353 | /* Td */ |
1354 | HPDF_EXPORT(HPDF_STATUS) |
1355 | HPDF_Page_MoveTextPos (HPDF_Page page, |
1356 | HPDF_REAL x, |
1357 | HPDF_REAL y); |
1358 | |
1359 | /* TD */ |
1360 | HPDF_EXPORT(HPDF_STATUS) |
1361 | HPDF_Page_MoveTextPos2 (HPDF_Page page, |
1362 | HPDF_REAL x, |
1363 | HPDF_REAL y); |
1364 | |
1365 | /* Tm */ |
1366 | HPDF_EXPORT(HPDF_STATUS) |
1367 | HPDF_Page_SetTextMatrix (HPDF_Page page, |
1368 | HPDF_REAL a, |
1369 | HPDF_REAL b, |
1370 | HPDF_REAL c, |
1371 | HPDF_REAL d, |
1372 | HPDF_REAL x, |
1373 | HPDF_REAL y); |
1374 | |
1375 | |
1376 | /* T* */ |
1377 | HPDF_EXPORT(HPDF_STATUS) |
1378 | HPDF_Page_MoveToNextLine (HPDF_Page page); |
1379 | |
1380 | /*--- Text showing -------------------------------------------------------*/ |
1381 | |
1382 | /* Tj */ |
1383 | HPDF_EXPORT(HPDF_STATUS) |
1384 | HPDF_Page_ShowText (HPDF_Page page, |
1385 | const char *text); |
1386 | |
1387 | /* TJ */ |
1388 | |
1389 | /* ' */ |
1390 | HPDF_EXPORT(HPDF_STATUS) |
1391 | HPDF_Page_ShowTextNextLine (HPDF_Page page, |
1392 | const char *text); |
1393 | |
1394 | /* " */ |
1395 | HPDF_EXPORT(HPDF_STATUS) |
1396 | HPDF_Page_ShowTextNextLineEx (HPDF_Page page, |
1397 | HPDF_REAL word_space, |
1398 | HPDF_REAL char_space, |
1399 | const char *text); |
1400 | |
1401 | |
1402 | /*--- Color showing ------------------------------------------------------*/ |
1403 | |
1404 | /* cs --not implemented yet */ |
1405 | /* CS --not implemented yet */ |
1406 | /* sc --not implemented yet */ |
1407 | /* scn --not implemented yet */ |
1408 | /* SC --not implemented yet */ |
1409 | /* SCN --not implemented yet */ |
1410 | |
1411 | /* g */ |
1412 | HPDF_EXPORT(HPDF_STATUS) |
1413 | HPDF_Page_SetGrayFill (HPDF_Page page, |
1414 | HPDF_REAL gray); |
1415 | |
1416 | /* G */ |
1417 | HPDF_EXPORT(HPDF_STATUS) |
1418 | HPDF_Page_SetGrayStroke (HPDF_Page page, |
1419 | HPDF_REAL gray); |
1420 | |
1421 | /* rg */ |
1422 | HPDF_EXPORT(HPDF_STATUS) |
1423 | HPDF_Page_SetRGBFill (HPDF_Page page, |
1424 | HPDF_REAL r, |
1425 | HPDF_REAL g, |
1426 | HPDF_REAL b); |
1427 | |
1428 | /* RG */ |
1429 | HPDF_EXPORT(HPDF_STATUS) |
1430 | HPDF_Page_SetRGBStroke (HPDF_Page page, |
1431 | HPDF_REAL r, |
1432 | HPDF_REAL g, |
1433 | HPDF_REAL b); |
1434 | |
1435 | /* k */ |
1436 | HPDF_EXPORT(HPDF_STATUS) |
1437 | HPDF_Page_SetCMYKFill (HPDF_Page page, |
1438 | HPDF_REAL c, |
1439 | HPDF_REAL m, |
1440 | HPDF_REAL y, |
1441 | HPDF_REAL k); |
1442 | |
1443 | /* K */ |
1444 | HPDF_EXPORT(HPDF_STATUS) |
1445 | HPDF_Page_SetCMYKStroke (HPDF_Page page, |
1446 | HPDF_REAL c, |
1447 | HPDF_REAL m, |
1448 | HPDF_REAL y, |
1449 | HPDF_REAL k); |
1450 | |
1451 | /*--- Shading patterns ---------------------------------------------------*/ |
1452 | |
1453 | /* sh --not implemented yet */ |
1454 | |
1455 | /*--- In-line images -----------------------------------------------------*/ |
1456 | |
1457 | /* BI --not implemented yet */ |
1458 | /* ID --not implemented yet */ |
1459 | /* EI --not implemented yet */ |
1460 | |
1461 | /*--- XObjects -----------------------------------------------------------*/ |
1462 | |
1463 | /* Do */ |
1464 | HPDF_EXPORT(HPDF_STATUS) |
1465 | HPDF_Page_ExecuteXObject (HPDF_Page page, |
1466 | HPDF_XObject obj); |
1467 | |
1468 | /*--- Content streams ----------------------------------------------------*/ |
1469 | |
1470 | HPDF_EXPORT(HPDF_STATUS) |
1471 | HPDF_Page_New_Content_Stream (HPDF_Page page, |
1472 | HPDF_Dict* new_stream); |
1473 | |
1474 | HPDF_EXPORT(HPDF_STATUS) |
1475 | HPDF_Page_Insert_Shared_Content_Stream (HPDF_Page page, |
1476 | HPDF_Dict shared_stream); |
1477 | |
1478 | |
1479 | /*--- Marked content -----------------------------------------------------*/ |
1480 | |
1481 | /* BMC --not implemented yet */ |
1482 | /* BDC --not implemented yet */ |
1483 | /* EMC --not implemented yet */ |
1484 | /* MP --not implemented yet */ |
1485 | /* DP --not implemented yet */ |
1486 | |
1487 | /*--- Compatibility ------------------------------------------------------*/ |
1488 | |
1489 | /* BX --not implemented yet */ |
1490 | /* EX --not implemented yet */ |
1491 | |
1492 | HPDF_EXPORT(HPDF_STATUS) |
1493 | HPDF_Page_DrawImage (HPDF_Page page, |
1494 | HPDF_Image image, |
1495 | HPDF_REAL x, |
1496 | HPDF_REAL y, |
1497 | HPDF_REAL width, |
1498 | HPDF_REAL height); |
1499 | |
1500 | |
1501 | HPDF_EXPORT(HPDF_STATUS) |
1502 | HPDF_Page_Circle (HPDF_Page page, |
1503 | HPDF_REAL x, |
1504 | HPDF_REAL y, |
1505 | HPDF_REAL ray); |
1506 | |
1507 | |
1508 | HPDF_EXPORT(HPDF_STATUS) |
1509 | HPDF_Page_Ellipse (HPDF_Page page, |
1510 | HPDF_REAL x, |
1511 | HPDF_REAL y, |
1512 | HPDF_REAL xray, |
1513 | HPDF_REAL yray); |
1514 | |
1515 | |
1516 | HPDF_EXPORT(HPDF_STATUS) |
1517 | HPDF_Page_Arc (HPDF_Page page, |
1518 | HPDF_REAL x, |
1519 | HPDF_REAL y, |
1520 | HPDF_REAL ray, |
1521 | HPDF_REAL ang1, |
1522 | HPDF_REAL ang2); |
1523 | |
1524 | |
1525 | HPDF_EXPORT(HPDF_STATUS) |
1526 | HPDF_Page_TextOut (HPDF_Page page, |
1527 | HPDF_REAL xpos, |
1528 | HPDF_REAL ypos, |
1529 | const char *text); |
1530 | |
1531 | |
1532 | HPDF_EXPORT(HPDF_STATUS) |
1533 | HPDF_Page_TextRect (HPDF_Page page, |
1534 | HPDF_REAL left, |
1535 | HPDF_REAL top, |
1536 | HPDF_REAL right, |
1537 | HPDF_REAL bottom, |
1538 | const char *text, |
1539 | HPDF_TextAlignment align, |
1540 | HPDF_UINT *len); |
1541 | |
1542 | |
1543 | HPDF_EXPORT(HPDF_STATUS) |
1544 | HPDF_Page_SetSlideShow (HPDF_Page page, |
1545 | HPDF_TransitionStyle type, |
1546 | HPDF_REAL disp_time, |
1547 | HPDF_REAL trans_time); |
1548 | |
1549 | |
1550 | HPDF_EXPORT(HPDF_OutputIntent) |
1551 | HPDF_ICC_LoadIccFromMem (HPDF_Doc pdf, |
1552 | HPDF_MMgr mmgr, |
1553 | HPDF_Stream iccdata, |
1554 | HPDF_Xref xref, |
1555 | int numcomponent); |
1556 | |
1557 | HPDF_EXPORT(HPDF_OutputIntent) |
1558 | HPDF_LoadIccProfileFromFile (HPDF_Doc pdf, |
1559 | const char* icc_file_name, |
1560 | int numcomponent); |
1561 | |
1562 | #ifdef __cplusplus |
1563 | } |
1564 | #endif /* __cplusplus */ |
1565 | |
1566 | #endif /* _HPDF_H */ |
1567 | |
1568 | |