@embedpdf/models 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/geometry.d.ts +36 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -1
- package/dist/pdf.d.ts +169 -4
- package/package.json +1 -1
package/dist/pdf.d.ts
CHANGED
|
@@ -565,6 +565,57 @@ export declare enum PdfAnnotationStateModel {
|
|
|
565
565
|
*/
|
|
566
566
|
Reviewed = "Reviewed"
|
|
567
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* Line ending of annotation
|
|
570
|
+
*
|
|
571
|
+
* @public
|
|
572
|
+
*/
|
|
573
|
+
export declare enum PdfAnnotationLineEnding {
|
|
574
|
+
/**
|
|
575
|
+
* No line ending
|
|
576
|
+
*/
|
|
577
|
+
None = 0,
|
|
578
|
+
/**
|
|
579
|
+
* Square line ending
|
|
580
|
+
*/
|
|
581
|
+
Square = 1,
|
|
582
|
+
/**
|
|
583
|
+
* Circle line ending
|
|
584
|
+
*/
|
|
585
|
+
Circle = 2,
|
|
586
|
+
/**
|
|
587
|
+
* Diamond line ending
|
|
588
|
+
*/
|
|
589
|
+
Diamond = 3,
|
|
590
|
+
/**
|
|
591
|
+
* Open arrow line ending
|
|
592
|
+
*/
|
|
593
|
+
OpenArrow = 4,
|
|
594
|
+
/**
|
|
595
|
+
* Closed arrow line ending
|
|
596
|
+
*/
|
|
597
|
+
ClosedArrow = 5,
|
|
598
|
+
/**
|
|
599
|
+
* Butt line ending
|
|
600
|
+
*/
|
|
601
|
+
Butt = 6,
|
|
602
|
+
/**
|
|
603
|
+
* Right open arrow line ending
|
|
604
|
+
*/
|
|
605
|
+
ROpenArrow = 7,
|
|
606
|
+
/**
|
|
607
|
+
* Right closed arrow line ending
|
|
608
|
+
*/
|
|
609
|
+
RClosedArrow = 8,
|
|
610
|
+
/**
|
|
611
|
+
* Slash line ending
|
|
612
|
+
*/
|
|
613
|
+
Slash = 9,
|
|
614
|
+
/**
|
|
615
|
+
* Unknown line ending
|
|
616
|
+
*/
|
|
617
|
+
Unknown = 10
|
|
618
|
+
}
|
|
568
619
|
/**
|
|
569
620
|
* Basic information of pdf annotation
|
|
570
621
|
*
|
|
@@ -810,6 +861,24 @@ export declare enum PdfPageObjectType {
|
|
|
810
861
|
SHADING = 4,
|
|
811
862
|
FORM = 5
|
|
812
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* Line points
|
|
866
|
+
*
|
|
867
|
+
* @public
|
|
868
|
+
*/
|
|
869
|
+
export interface LinePoints {
|
|
870
|
+
start: Position;
|
|
871
|
+
end: Position;
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Line endings
|
|
875
|
+
*
|
|
876
|
+
* @public
|
|
877
|
+
*/
|
|
878
|
+
export interface LineEndings {
|
|
879
|
+
start: PdfAnnotationLineEnding;
|
|
880
|
+
end: PdfAnnotationLineEnding;
|
|
881
|
+
}
|
|
813
882
|
/**
|
|
814
883
|
* Options of pdf widget annotation
|
|
815
884
|
*
|
|
@@ -930,10 +999,38 @@ export interface PdfInkAnnoObject extends PdfAnnotationObjectBase {
|
|
|
930
999
|
export interface PdfPolygonAnnoObject extends PdfAnnotationObjectBase {
|
|
931
1000
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
932
1001
|
type: PdfAnnotationSubtype.POLYGON;
|
|
1002
|
+
/**
|
|
1003
|
+
* contents of polygon annotation
|
|
1004
|
+
*/
|
|
1005
|
+
contents?: string;
|
|
933
1006
|
/**
|
|
934
1007
|
* vertices of annotation
|
|
935
1008
|
*/
|
|
936
1009
|
vertices: Position[];
|
|
1010
|
+
/**
|
|
1011
|
+
* color of ink annotation
|
|
1012
|
+
*/
|
|
1013
|
+
color: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* opacity of ink annotation
|
|
1016
|
+
*/
|
|
1017
|
+
opacity: number;
|
|
1018
|
+
/**
|
|
1019
|
+
* stroke-width of ink annotation
|
|
1020
|
+
*/
|
|
1021
|
+
strokeWidth: number;
|
|
1022
|
+
/**
|
|
1023
|
+
* stroke color of polygon annotation
|
|
1024
|
+
*/
|
|
1025
|
+
strokeColor: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* stroke style of polygon annotation
|
|
1028
|
+
*/
|
|
1029
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
1030
|
+
/**
|
|
1031
|
+
* stroke dash array of polygon annotation
|
|
1032
|
+
*/
|
|
1033
|
+
strokeDashArray?: number[];
|
|
937
1034
|
}
|
|
938
1035
|
/**
|
|
939
1036
|
* PDF polyline annotation
|
|
@@ -943,10 +1040,42 @@ export interface PdfPolygonAnnoObject extends PdfAnnotationObjectBase {
|
|
|
943
1040
|
export interface PdfPolylineAnnoObject extends PdfAnnotationObjectBase {
|
|
944
1041
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
945
1042
|
type: PdfAnnotationSubtype.POLYLINE;
|
|
1043
|
+
/**
|
|
1044
|
+
* contents of polyline annotation
|
|
1045
|
+
*/
|
|
1046
|
+
contents?: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* start and end line endings of polyline
|
|
1049
|
+
*/
|
|
1050
|
+
lineEndings?: LineEndings;
|
|
946
1051
|
/**
|
|
947
1052
|
* vertices of annotation
|
|
948
1053
|
*/
|
|
949
1054
|
vertices: Position[];
|
|
1055
|
+
/**
|
|
1056
|
+
* interior color of line annotation
|
|
1057
|
+
*/
|
|
1058
|
+
color: string;
|
|
1059
|
+
/**
|
|
1060
|
+
* opacity of ink annotation
|
|
1061
|
+
*/
|
|
1062
|
+
opacity: number;
|
|
1063
|
+
/**
|
|
1064
|
+
* stroke-width of ink annotation
|
|
1065
|
+
*/
|
|
1066
|
+
strokeWidth: number;
|
|
1067
|
+
/**
|
|
1068
|
+
* stroke color of line annotation
|
|
1069
|
+
*/
|
|
1070
|
+
strokeColor: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* stroke style of polyline annotation
|
|
1073
|
+
*/
|
|
1074
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
1075
|
+
/**
|
|
1076
|
+
* stroke dash array of polyline annotation
|
|
1077
|
+
*/
|
|
1078
|
+
strokeDashArray?: number[];
|
|
950
1079
|
}
|
|
951
1080
|
/**
|
|
952
1081
|
* PDF line annotation
|
|
@@ -957,13 +1086,41 @@ export interface PdfLineAnnoObject extends PdfAnnotationObjectBase {
|
|
|
957
1086
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
958
1087
|
type: PdfAnnotationSubtype.LINE;
|
|
959
1088
|
/**
|
|
960
|
-
*
|
|
1089
|
+
* contents of line annotation
|
|
961
1090
|
*/
|
|
962
|
-
|
|
1091
|
+
contents?: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* start and end points of line
|
|
1094
|
+
*/
|
|
1095
|
+
linePoints: LinePoints;
|
|
1096
|
+
/**
|
|
1097
|
+
* start and end line endings of line
|
|
1098
|
+
*/
|
|
1099
|
+
lineEndings?: LineEndings;
|
|
963
1100
|
/**
|
|
964
|
-
*
|
|
1101
|
+
* interior color of line annotation
|
|
965
1102
|
*/
|
|
966
|
-
|
|
1103
|
+
color: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* opacity of ink annotation
|
|
1106
|
+
*/
|
|
1107
|
+
opacity: number;
|
|
1108
|
+
/**
|
|
1109
|
+
* stroke-width of ink annotation
|
|
1110
|
+
*/
|
|
1111
|
+
strokeWidth: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* stroke color of line annotation
|
|
1114
|
+
*/
|
|
1115
|
+
strokeColor: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* stroke style of line annotation
|
|
1118
|
+
*/
|
|
1119
|
+
strokeStyle: PdfAnnotationBorderStyle;
|
|
1120
|
+
/**
|
|
1121
|
+
* stroke dash array of line annotation
|
|
1122
|
+
*/
|
|
1123
|
+
strokeDashArray?: number[];
|
|
967
1124
|
}
|
|
968
1125
|
/**
|
|
969
1126
|
* PDF highlight annotation
|
|
@@ -1123,6 +1280,10 @@ export interface PdfCircleAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1123
1280
|
* flags of circle annotation
|
|
1124
1281
|
*/
|
|
1125
1282
|
flags: PdfAnnotationFlagName[];
|
|
1283
|
+
/**
|
|
1284
|
+
* Text contents of the circle annotation
|
|
1285
|
+
*/
|
|
1286
|
+
contents?: string;
|
|
1126
1287
|
/**
|
|
1127
1288
|
* color of circle annotation
|
|
1128
1289
|
*/
|
|
@@ -1164,6 +1325,10 @@ export interface PdfCircleAnnoObject extends PdfAnnotationObjectBase {
|
|
|
1164
1325
|
export interface PdfSquareAnnoObject extends PdfAnnotationObjectBase {
|
|
1165
1326
|
/** {@inheritDoc PdfAnnotationObjectBase.type} */
|
|
1166
1327
|
type: PdfAnnotationSubtype.SQUARE;
|
|
1328
|
+
/**
|
|
1329
|
+
* Text contents of the square annotation
|
|
1330
|
+
*/
|
|
1331
|
+
contents?: string;
|
|
1167
1332
|
/**
|
|
1168
1333
|
* flags of square annotation
|
|
1169
1334
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/models",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared type definitions, data models, and utility helpers (geometry, tasks, logging, PDF primitives) that underpin every package in the EmbedPDF ecosystem.",
|
|
6
6
|
"type": "module",
|