-
Notifications
You must be signed in to change notification settings - Fork 1
/
haru_funcs.tcl
1271 lines (1051 loc) · 29.2 KB
/
haru_funcs.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (c) 2022-2023 Nicolas ROBERT.
# Distributed under MIT license. Please see LICENSE for details.
# haru - Tcl binding for libharu (http://libharu.org/) PDF library.
# Invoke C functions...
# hpdf.h :
# HPDF_GetPageMMgr HPDF_MMgr {page HPDF_Page}
HPDF stdcalls {
HPDF_Free void {pdf {HPDF_Doc dispose}}
HPDF_NewDoc HPDF_STATUS {pdf HPDF_Doc}
HPDF_FreeDoc void {pdf HPDF_Doc}
HPDF_FreeDocAll void {pdf HPDF_Doc}
HPDF_HasDoc HPDF_BOOL {pdf HPDF_Doc}
HPDF_SaveToStream HPDF_STATUS {pdf HPDF_Doc}
HPDF_ResetStream HPDF_STATUS {pdf HPDF_Doc}
HPDF_New HPDF_Doc {
user_error_fn {pointer {default NULL} nullok}
user_error_data {pointer {default NULL} nullok}
}
HPDF_SaveToFile HPDF_STATUS {
pdf HPDF_Doc
filename string
}
HPDF_GetError ulong {pdf HPDF_Doc}
HPDF_GetErrorDetail HPDF_STATUS {pdf HPDF_Doc}
HPDF_ResetError void {pdf HPDF_Doc}
HPDF_SetPagesConfiguration HPDF_STATUS {
pdf HPDF_Doc
page_per_pages HPDF_UINT
}
HPDF_GetPageByIndex HPDF_Page {
pdf HPDF_Doc
index HPDF_UINT
}
HPDF_GetPageLayout HPDF_PageLayout {pdf HPDF_Doc}
HPDF_SetPageLayout HPDF_STATUS {
pdf HPDF_Doc
layout HPDF_PageLayout
}
HPDF_GetPageMode HPDF_PageMode {pdf HPDF_Doc}
HPDF_SetPageMode HPDF_STATUS {
pdf HPDF_Doc
mode HPDF_PageMode
}
HPDF_SetOpenAction HPDF_STATUS {
pdf HPDF_Doc
open_action HPDF_Destination
}
HPDF_GetViewerPreference HPDF_UINT {pdf HPDF_Doc}
HPDF_SetViewerPreference HPDF_STATUS {
pdf HPDF_Doc
value HPDF_UINT
}
}
# page handling :
HPDF stdcalls {
HPDF_GetCurrentPage HPDF_Page {pdf HPDF_Doc}
HPDF_AddPage HPDF_Page {pdf HPDF_Doc}
HPDF_InsertPage HPDF_Page {
pdf HPDF_Doc
page HPDF_Page
}
HPDF_Page_SetWidth HPDF_STATUS {
page HPDF_Page
value HPDF_REAL
}
HPDF_Page_SetHeight HPDF_STATUS {
page HPDF_Page
value HPDF_REAL
}
HPDF_Page_SetSize HPDF_STATUS {
page HPDF_Page
size HPDF_PageSizes
direction HPDF_PageDirection
}
HPDF_Page_SetRotate HPDF_STATUS {
page HPDF_Page
angle HPDF_UINT16
}
HPDF_Page_SetZoom HPDF_STATUS {
page HPDF_Page
zoom HPDF_REAL
}
}
# font handling :
HPDF stdcalls {
HPDF_UseJPFonts HPDF_STATUS {pdf HPDF_Doc}
HPDF_UseKRFonts HPDF_STATUS {pdf HPDF_Doc}
HPDF_UseCNSFonts HPDF_STATUS {pdf HPDF_Doc}
HPDF_UseCNTFonts HPDF_STATUS {pdf HPDF_Doc}
HPDF_GetFont {HPDF_Font counted} {
pdf HPDF_Doc
font_name string
encoding_name {string nullifempty}
}
HPDF_LoadType1FontFromFile string {
pdf HPDF_Doc
afmfilename string
pfmfilename string
}
HPDF_GetTTFontDefFromFile HPDF_FontDef {
pdf HPDF_Doc
file_name string
embedding HPDF_BOOL
}
HPDF_LoadTTFontFromFile string {
pdf HPDF_Doc
file_name string
embedding HPDF_BOOL
}
HPDF_LoadTTFontFromFile2 string {
pdf HPDF_Doc
file_name string
index HPDF_UINT
embedding HPDF_BOOL
}
HPDF_AddPageLabel HPDF_STATUS {
pdf HPDF_Doc
page_num HPDF_UINT
style HPDF_PageNumStyle
first_page HPDF_UINT
prefix string
}
HPDF_GetFontDef {HPDF_FontDef} {
pdf HPDF_Doc
file_name string
}
}
# outline :
HPDF stdcalls {
HPDF_CreateOutline HPDF_Outline {
pdf HPDF_Doc
parent {HPDF_Outline unsafe nullok}
title string
encoded {HPDF_Encoder unsafe nullok}
}
HPDF_Outline_SetOpened HPDF_STATUS {
houtline HPDF_Outline
opened HPDF_BOOL
}
HPDF_Outline_SetDestination HPDF_STATUS {
houtline HPDF_Outline
hdest HPDF_Destination
}
}
# destination :
HPDF stdcalls {
HPDF_Page_CreateDestination HPDF_Destination {page HPDF_Page}
HPDF_Destination_SetFit HPDF_STATUS {hdest HPDF_Destination}
HPDF_Destination_SetFitB HPDF_STATUS {hdest HPDF_Destination}
HPDF_Destination_SetXYZ HPDF_STATUS {
hdest HPDF_Destination
left HPDF_REAL
top HPDF_REAL
zoom HPDF_REAL
}
HPDF_Destination_SetFitH HPDF_STATUS {
hdest HPDF_Destination
top HPDF_REAL
}
HPDF_Destination_SetFitV HPDF_STATUS {
hdest HPDF_Destination
left HPDF_REAL
}
HPDF_Destination_SetFitR HPDF_STATUS {
hdest HPDF_Destination
left HPDF_REAL
bottom HPDF_REAL
right HPDF_REAL
top HPDF_REAL
}
HPDF_Destination_SetFitBH HPDF_STATUS {
hdest HPDF_Destination
top HPDF_REAL
}
HPDF_Destination_SetFitBV HPDF_STATUS {
hdest HPDF_Destination
left HPDF_REAL
}
}
# encoder :
HPDF stdcalls {
HPDF_GetCurrentEncoder HPDF_Encoder {pdf HPDF_Doc}
HPDF_Encoder_GetType HPDF_EncoderType {hencoder HPDF_Encoder}
HPDF_Encoder_GetWritingMode HPDF_WritingMode {hencoder HPDF_Encoder}
HPDF_UseJPEncodings HPDF_STATUS {pdf HPDF_Doc}
HPDF_UseKREncodings HPDF_STATUS {pdf HPDF_Doc}
HPDF_UseCNSEncodings HPDF_STATUS {pdf HPDF_Doc}
HPDF_UseCNTEncodings HPDF_STATUS {pdf HPDF_Doc}
HPDF_UseUTFEncodings HPDF_STATUS {pdf HPDF_Doc}
HPDF_GetEncoder HPDF_Encoder {
pdf HPDF_Doc
encoding_name string
}
HPDF_SetCurrentEncoder HPDF_STATUS {
pdf HPDF_Doc
encoding_name string
}
HPDF_Encoder_GetByteType HPDF_ByteType {
hencoder HPDF_Encoder
text unistring
index HPDF_UINT
}
HPDF_Encoder_GetUnicode HPDF_UNICODE {
hencoder HPDF_Encoder
code HPDF_UINT16
}
}
# annotation :
# HPDF_Page_CreateWidgetAnnot_WhiteOnlyWhilePrint HPDF_Annotation {
# pdf HPDF_Doc
# page HPDF_Page
# rect HPDF_Rect
# }
# HPDF_Page_CreateWidgetAnnot HPDF_Annotation {
# page HPDF_Page
# rect HPDF_Rect
# }
HPDF stdcalls {
HPDF_Page_Create3DAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
tb HPDF_BOOL
nb HPDF_BOOL
u3d HPDF_U3D
ap {HPDF_Image nullok}
}
HPDF_Page_CreateTextAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreateFreeTextAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreateLineAnnot HPDF_Annotation {
page HPDF_Page
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreateLinkAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
dst HPDF_Destination
}
HPDF_Page_CreateURILinkAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
url string
}
HPDF_Page_CreateHighlightAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreateUnderlineAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreateSquigglyAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreatePopupAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
parent HPDF_Annotation
}
HPDF_Page_CreateProjectionAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreateSquareAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_Page_CreateCircleAnnot HPDF_Annotation {
page HPDF_Page
rect HPDF_Rect
text binary
encoder {HPDF_Encoder nullok}
}
HPDF_LinkAnnot_SetHighlightMode HPDF_STATUS {
hannot HPDF_Annotation
mode HPDF_AnnotHighlightMode
}
HPDF_LinkAnnot_SetBorderStyle HPDF_STATUS {
hannot HPDF_Annotation
width HPDF_REAL
dash_on HPDF_UINT16
dash_off HPDF_UINT16
}
HPDF_TextAnnot_SetIcon HPDF_STATUS {
hannot HPDF_Annotation
icon HPDF_AnnotIcon
}
HPDF_TextAnnot_SetOpened HPDF_STATUS {
hannot HPDF_Annotation
opened HPDF_BOOL
}
HPDF_Annot_SetRGBColor HPDF_STATUS {
hannot HPDF_Annotation
color HPDF_RGBColor
}
HPDF_Annot_SetCMYKColor HPDF_STATUS {
hannot HPDF_Annotation
color HPDF_CMYKColor
}
HPDF_Annot_SetGrayColor HPDF_STATUS {
hannot HPDF_Annotation
color HPDF_REAL
}
HPDF_Annot_SetNoColor HPDF_STATUS {
hannot HPDF_Annotation
}
HPDF_MarkupAnnot_SetTitle HPDF_STATUS {
hannot HPDF_Annotation
name string
}
HPDF_MarkupAnnot_SetSubject HPDF_STATUS {
hannot HPDF_Annotation
name string
}
HPDF_MarkupAnnot_SetCreationDate HPDF_STATUS {
hannot HPDF_Annotation
name HPDF_Date
}
HPDF_MarkupAnnot_SetTransparency HPDF_STATUS {
hannot HPDF_Annotation
value HPDF_REAL
}
HPDF_MarkupAnnot_SetPopup HPDF_STATUS {
hannot HPDF_Annotation
value HPDF_REAL
}
HPDF_MarkupAnnot_SetTransparency HPDF_STATUS {
hannot HPDF_Annotation
popup HPDF_Annotation
}
HPDF_MarkupAnnot_SetRectDiff HPDF_STATUS {
hannot HPDF_Annotation
rect HPDF_Rect
}
HPDF_MarkupAnnot_SetCloudEffect HPDF_STATUS {
hannot HPDF_Annotation
cloudIntensity HPDF_INT
}
HPDF_MarkupAnnot_SetInteriorRGBColor HPDF_STATUS {
hannot HPDF_Annotation
color HPDF_RGBColor
}
HPDF_MarkupAnnot_SetInteriorCMYKColor HPDF_STATUS {
hannot HPDF_Annotation
color HPDF_CMYKColor
}
HPDF_MarkupAnnot_SetInteriorGrayColor HPDF_STATUS {
hannot HPDF_Annotation
color HPDF_REAL
}
HPDF_MarkupAnnot_SetInteriorTransparent HPDF_STATUS {
hannot HPDF_Annotation
}
HPDF_TextMarkupAnnot_SetQuadPoints HPDF_STATUS {
hannot HPDF_Annotation
lb HPDF_Point
rb HPDF_Point
rt HPDF_Point
lt HPDF_Point
}
HPDF_Annot_Set3DView HPDF_STATUS {
mmgr HPDF_MMgr
annot HPDF_Annotation
annot3d HPDF_Annotation
view HPDF_Dict
}
HPDF_PopupAnnot_SetOpened HPDF_STATUS {
hannot HPDF_Annotation
opened HPDF_BOOL
}
HPDF_FreeTextAnnot_Set3PointCalloutLine HPDF_STATUS {
hannot HPDF_Annotation
startPoint HPDF_Point
kneePoint HPDF_Point
endPoint HPDF_Point
}
HPDF_FreeTextAnnot_Set2PointCalloutLine HPDF_STATUS {
hannot HPDF_Annotation
startPoint HPDF_Point
endPoint HPDF_Point
}
HPDF_FreeTextAnnot_SetDefaultStyle HPDF_STATUS {
hannot HPDF_Annotation
style string
}
HPDF_LineAnnot_SetLeader HPDF_STATUS {
hannot HPDF_Annotation
leaderLen HPDF_INT
leaderExtLen HPDF_INT
leaderOffsetLen HPDF_INT
}
HPDF_ProjectionAnnot_SetExData HPDF_STATUS {
hannot HPDF_Annotation
exdata HPDF_ExData
}
}
# 3D Measure
HPDF stdcalls {
HPDF_Page_Create3DC3DMeasure HPDF_3DMeasure {
page HPDF_Page
firstanchorpoint HPDF_Point3D
textanchorpoint HPDF_Point3D
}
HPDF_Page_CreatePD33DMeasure HPDF_3DMeasure {
page HPDF_Page
annotationPlaneNormal HPDF_Point3D
firstAnchorPoint HPDF_Point3D
secondAnchorPoint HPDF_Point3D
leaderLinesDirection HPDF_Point3D
measurementValuePoint HPDF_Point3D
textYDirection HPDF_Point3D
value HPDF_REAL
unitsString string
}
HPDF_3DMeasure_SetName HPDF_STATUS {
measure HPDF_3DMeasure
name string
}
HPDF_3DMeasure_SetColor HPDF_STATUS {
measure HPDF_3DMeasure
color HPDF_RGBColor
}
HPDF_3DMeasure_SetTextSize HPDF_STATUS {
measure HPDF_3DMeasure
textsize HPDF_REAL
}
HPDF_3DC3DMeasure_SetTextBoxSize HPDF_STATUS {
measure HPDF_3DMeasure
x HPDF_INT32
y HPDF_INT32
}
HPDF_3DC3DMeasure_SetText HPDF_STATUS {
measure HPDF_3DMeasure
text string
encoder HPDF_Encoder
}
HPDF_3DC3DMeasure_SetProjectionAnotation HPDF_STATUS {
measure HPDF_3DMeasure
projectionanotation HPDF_Annotation
}
}
# External Data
HPDF stdcalls {
HPDF_Page_Create3DAnnotExData HPDF_ExData {
page HPDF_Page
}
HPDF_3DAnnotExData_Set3DMeasurement HPDF_ExData {
exdata HPDF_ExData
measure HPDF_3DMeasure
}
}
# 3D View
HPDF stdcalls {
HPDF_Page_Create3DView HPDF_Dict {
page HPDF_Page
u3d HPDF_U3D
annot3d HPDF_Annotation
name string
}
HPDF_3DView_Add3DC3DMeasure HPDF_STATUS {
view HPDF_Dict
measure HPDF_3DMeasure
}
}
# image data
HPDF stdcalls {
HPDF_LoadPngImageFromFile HPDF_Image {
pdf HPDF_Doc
filename string
}
HPDF_LoadPngImageFromFile2 HPDF_Image {
pdf HPDF_Doc
filename string
}
HPDF_LoadJpegImageFromFile HPDF_Image {
pdf HPDF_Doc
filename string
}
HPDF_LoadU3DFromFile HPDF_U3D {
pdf HPDF_Doc
filename string
}
HPDF_LoadRawImageFromFile HPDF_Image {
pdf HPDF_Doc
filename string
width HPDF_UINT
height HPDF_UINT
color_space HPDF_ColorSpace
}
HPDF_LoadRawImageFromMem HPDF_Image {
pdf HPDF_Doc
data uchar[N]
width HPDF_UINT
height HPDF_UINT
color_space HPDF_ColorSpace
bits_per_component HPDF_UINT
N int
}
HPDF_Image_AddSMask HPDF_STATUS {
image HPDF_Image
smask HPDF_Image
}
HPDF_Image_GetSize HPDF_STATUS {
image HPDF_Image
position {HPDF_Point out}
}
HPDF_Image_GetWidth HPDF_UINT {image HPDF_Image}
HPDF_Image_GetHeight HPDF_UINT {image HPDF_Image}
HPDF_Image_GetBitsPerComponent HPDF_UINT {image HPDF_Image}
HPDF_Image_GetColorSpace string {image HPDF_Image}
HPDF_Image_SetColorMask HPDF_STATUS {
image HPDF_Image
rmin HPDF_UINT
rmax HPDF_UINT
gmin HPDF_UINT
gmax HPDF_UINT
bmin HPDF_UINT
bmax HPDF_UINT
}
HPDF_Image_SetMaskImage HPDF_STATUS {
image HPDF_Image
image_mask HPDF_Image
}
}
# info dictionary
HPDF stdcalls {
HPDF_SetInfoAttr HPDF_STATUS {
pdf HPDF_Doc
type HPDF_InfoType
value string
}
HPDF_SetInfoDateAttr HPDF_STATUS {
pdf HPDF_Doc
type HPDF_InfoType
value HPDF_Date
}
HPDF_GetInfoAttr unistring {
pdf HPDF_Doc
type HPDF_InfoType
}
}
# encryption
HPDF stdcalls {
HPDF_SetPassword HPDF_STATUS {
pdf HPDF_Doc
owner_passwd string
user_passwd string
}
HPDF_SetPermission HPDF_STATUS {
pdf HPDF_Doc
permission HPDF_UINT
}
HPDF_SetEncryptionMode HPDF_STATUS {
pdf HPDF_Doc
mode HPDF_EncryptMode
key_len HPDF_UINT
}
}
# compression
HPDF stdcalls {
HPDF_SetCompressionMode HPDF_STATUS {
pdf HPDF_Doc
mode HPDF_UINT
}
}
# font
HPDF stdcalls {
HPDF_Font_GetFontName string {hfont HPDF_Font}
HPDF_Font_GetEncodingName string {hfont HPDF_Font}
HPDF_Font_GetUnicodeWidth HPDF_INT {
hfont HPDF_Font
code HPDF_UNICODE
}
HPDF_Font_GetBBox HPDF_Box {hfont HPDF_Font}
HPDF_Font_GetAscent HPDF_INT {hfont HPDF_Font}
HPDF_Font_GetDescent HPDF_INT {hfont HPDF_Font}
HPDF_Font_GetXHeight HPDF_INT {hfont HPDF_Font}
HPDF_Font_GetCapHeight HPDF_INT {hfont HPDF_Font}
HPDF_Font_TextWidth HPDF_TextWidth {
hfont HPDF_Font
text string
len HPDF_UINT
}
HPDF_Font_MeasureText HPDF_UINT {
hfont HPDF_Font
text string
len HPDF_UINT
width HPDF_REAL
font_size HPDF_REAL
char_space HPDF_REAL
word_space HPDF_REAL
wordwrap HPDF_BOOL
real_width {HPDF_REAL out}
}
}
# attachements
HPDF stdcalls {
HPDF_AttachFile HPDF_EmbeddedFile {
pdf HPDF_Doc
file string
}
}
# extended graphics state
HPDF stdcalls {
HPDF_CreateExtGState HPDF_ExtGState {pdf HPDF_Doc}
HPDF_ExtGState_SetAlphaStroke HPDF_STATUS {
gstate HPDF_ExtGState
value HPDF_REAL
}
HPDF_ExtGState_SetAlphaFill HPDF_STATUS {
gstate HPDF_ExtGState
value HPDF_REAL
}
HPDF_ExtGState_SetBlendMode HPDF_STATUS {
gstate HPDF_ExtGState
mode HPDF_BlendMode
}
}
HPDF stdcalls {
HPDF_Page_TextWidth HPDF_REAL {
page HPDF_Page
text binary
}
HPDF_Page_MeasureText HPDF_UINT {
page HPDF_Page
text binary
width HPDF_REAL
wordwrap HPDF_BOOL
real_width HPDF_REAL
}
HPDF_Page_GetWidth HPDF_REAL {page HPDF_Page}
HPDF_Page_GetHeight HPDF_REAL {page HPDF_Page}
HPDF_Page_GetGMode HPDF_UINT16 {page HPDF_Page}
HPDF_Page_GetCurrentPos HPDF_Point {page HPDF_Page}
HPDF_Page_GetCurrentPos2 HPDF_STATUS {
page HPDF_Page
position {HPDF_Point out}
}
HPDF_Page_GetCurrentTextPos HPDF_Point {
page HPDF_Page
}
HPDF_Page_GetCurrentTextPos2 HPDF_STATUS {
page HPDF_Page
position {HPDF_Point out}
}
HPDF_Page_GetCurrentFont {HPDF_Font counted} {page HPDF_Page}
HPDF_Page_GetCurrentFontSize HPDF_REAL {page HPDF_Page}
HPDF_Page_GetTransMatrix HPDF_TransMatrix {page HPDF_Page}
HPDF_Page_GetLineWidth HPDF_REAL {page HPDF_Page}
HPDF_Page_GetLineCap HPDF_LineCap {page HPDF_Page}
HPDF_Page_GetLineJoin HPDF_LineJoin {page HPDF_Page}
HPDF_Page_GetMiterLimit HPDF_REAL {page HPDF_Page}
HPDF_Page_GetDash HPDF_DashMode {page HPDF_Page}
HPDF_Page_GetFlat HPDF_REAL {page HPDF_Page}
HPDF_Page_GetCharSpace HPDF_REAL {page HPDF_Page}
HPDF_Page_GetWordSpace HPDF_REAL {page HPDF_Page}
HPDF_Page_GetHorizontalScalling HPDF_REAL {page HPDF_Page}
HPDF_Page_GetTextLeading HPDF_REAL {page HPDF_Page}
HPDF_Page_GetTextRenderingMode HPDF_TextRenderingMode {page HPDF_Page}
HPDF_Page_GetTextRaise HPDF_REAL {page HPDF_Page}
HPDF_Page_GetTextRise HPDF_REAL {page HPDF_Page}
HPDF_Page_GetRGBFill HPDF_RGBColor {page HPDF_Page}
HPDF_Page_GetRGBStroke HPDF_RGBColor {page HPDF_Page}
HPDF_Page_GetCMYKFill HPDF_CMYKColor {page HPDF_Page}
HPDF_Page_GetCMYKStroke HPDF_CMYKColor {page HPDF_Page}
HPDF_Page_GetGrayFill HPDF_REAL {page HPDF_Page}
HPDF_Page_GetGrayStroke HPDF_REAL {page HPDF_Page}
HPDF_Page_GetStrokingColorSpace HPDF_ColorSpace {page HPDF_Page}
HPDF_Page_GetFillingColorSpace HPDF_ColorSpace {page HPDF_Page}
HPDF_Page_GetTextMatrix HPDF_TransMatrix {page HPDF_Page}
HPDF_Page_GetGStateDepth HPDF_UINT {page HPDF_Page}
}
# GRAPHICS OPERATORS
# General graphics state
HPDF stdcalls {
HPDF_Page_SetLineWidth HPDF_STATUS {
page HPDF_Page
line_width HPDF_REAL
}
HPDF_Page_SetLineCap HPDF_STATUS {
page HPDF_Page
line_cap HPDF_LineCap
}
HPDF_Page_SetLineJoin HPDF_STATUS {
page HPDF_Page
line_join HPDF_LineJoin
}
HPDF_Page_SetMiterLimit HPDF_STATUS {
page HPDF_Page
miter_limit HPDF_REAL
}
HPDF_Page_SetDash HPDF_STATUS {
page HPDF_Page
dash_ptn float[5]
num_param HPDF_UINT
phase HPDF_REAL
}
HPDF_Page_SetFlat HPDF_STATUS {
page HPDF_Page
flatness HPDF_REAL
}
HPDF_Page_SetExtGState HPDF_STATUS {
page HPDF_Page
ext_gstate HPDF_ExtGState
}
}
# Special graphic state operator
HPDF stdcalls {
HPDF_Page_GSave HPDF_STATUS {page HPDF_Page}
HPDF_Page_GRestore HPDF_STATUS {page HPDF_Page}
HPDF_Page_Concat HPDF_STATUS {
page HPDF_Page
a HPDF_REAL
b HPDF_REAL
c HPDF_REAL
d HPDF_REAL
x HPDF_REAL
y HPDF_REAL
}
}
# Path construction operator
HPDF stdcalls {
HPDF_Page_MoveTo HPDF_STATUS {
page HPDF_Page
x HPDF_REAL
y HPDF_REAL
}
HPDF_Page_LineTo HPDF_STATUS {
page HPDF_Page
x HPDF_REAL
y HPDF_REAL
}
HPDF_Page_CurveTo HPDF_STATUS {
page HPDF_Page
x1 HPDF_REAL
y1 HPDF_REAL
x2 HPDF_REAL
y2 HPDF_REAL
x3 HPDF_REAL
y3 HPDF_REAL
}
HPDF_Page_CurveTo2 HPDF_STATUS {
page HPDF_Page
x2 HPDF_REAL
y2 HPDF_REAL
x3 HPDF_REAL
y3 HPDF_REAL
}
HPDF_Page_CurveTo3 HPDF_STATUS {
page HPDF_Page
x1 HPDF_REAL
y1 HPDF_REAL
x3 HPDF_REAL
y3 HPDF_REAL
}
HPDF_Page_ClosePath HPDF_STATUS {page HPDF_Page}
HPDF_Page_Rectangle HPDF_STATUS {
page HPDF_Page
x HPDF_REAL
y HPDF_REAL
width HPDF_REAL
height HPDF_REAL
}
}
# Path painting operator
HPDF stdcalls {
HPDF_Page_Stroke HPDF_STATUS {page HPDF_Page}
HPDF_Page_ClosePathStroke HPDF_STATUS {page HPDF_Page}
HPDF_Page_Fill HPDF_STATUS {page HPDF_Page}
HPDF_Page_Eofill HPDF_STATUS {page HPDF_Page}
HPDF_Page_FillStroke HPDF_STATUS {page HPDF_Page}
HPDF_Page_EofillStroke HPDF_STATUS {page HPDF_Page}
HPDF_Page_ClosePathFillStroke HPDF_STATUS {page HPDF_Page}
HPDF_Page_ClosePathEofillStroke HPDF_STATUS {page HPDF_Page}
HPDF_Page_EndPath HPDF_STATUS {page HPDF_Page}
}
# Clipping paths operator
HPDF stdcalls {
HPDF_Page_Clip HPDF_STATUS {page HPDF_Page}
HPDF_Page_Eoclip HPDF_STATUS {page HPDF_Page}
}
# Text object operator
HPDF stdcalls {
HPDF_Page_BeginText HPDF_STATUS {page HPDF_Page}
HPDF_Page_EndText HPDF_STATUS {page HPDF_Page}
}
# Text state
HPDF stdcalls {
HPDF_Page_SetCharSpace HPDF_STATUS {
page HPDF_Page
value HPDF_REAL
}
HPDF_Page_SetWordSpace HPDF_STATUS {
page HPDF_Page
value HPDF_REAL
}
HPDF_Page_SetHorizontalScalling HPDF_STATUS {
page HPDF_Page
value HPDF_REAL