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