@embedpdf/engines 2.8.0 → 2.9.0
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/direct-engine-CDxs18JK.cjs +2 -0
- package/dist/direct-engine-CDxs18JK.cjs.map +1 -0
- package/dist/{direct-engine-BOkKwXM0.js → direct-engine-D-Jf9yyY.js} +26 -15
- package/dist/direct-engine-D-Jf9yyY.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/pdfium/engine.d.ts +8 -0
- package/dist/lib/pdfium/index.cjs +1 -1
- package/dist/lib/pdfium/index.js +2 -2
- package/dist/lib/pdfium/web/direct-engine.cjs +1 -1
- package/dist/lib/pdfium/web/direct-engine.js +1 -1
- package/dist/lib/pdfium/web/worker-engine.cjs +1 -1
- package/dist/lib/pdfium/web/worker-engine.js +1 -1
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +5 -5
- package/dist/direct-engine-BOkKwXM0.js.map +0 -1
- package/dist/direct-engine-DQgFpJUz.cjs +0 -2
- package/dist/direct-engine-DQgFpJUz.cjs.map +0 -1
|
@@ -3102,10 +3102,9 @@ class PdfiumNative {
|
|
|
3102
3102
|
return false;
|
|
3103
3103
|
}
|
|
3104
3104
|
if (annotation.type === PdfAnnotationSubtype.POLYGON) {
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
);
|
|
3105
|
+
const poly = annotation;
|
|
3106
|
+
this.setRectangleDifferences(annotationPtr, poly.rectangleDifferences);
|
|
3107
|
+
this.setBorderEffect(annotationPtr, poly.cloudyBorderIntensity);
|
|
3109
3108
|
}
|
|
3110
3109
|
return this.applyBaseAnnotationProperties(doc, page, pagePtr, annotationPtr, annotation);
|
|
3111
3110
|
}
|
|
@@ -3183,6 +3182,7 @@ class PdfiumNative {
|
|
|
3183
3182
|
return false;
|
|
3184
3183
|
}
|
|
3185
3184
|
this.setRectangleDifferences(annotationPtr, annotation.rectangleDifferences);
|
|
3185
|
+
this.setBorderEffect(annotationPtr, annotation.cloudyBorderIntensity);
|
|
3186
3186
|
return this.applyBaseAnnotationProperties(doc, page, pagePtr, annotationPtr, annotation);
|
|
3187
3187
|
}
|
|
3188
3188
|
/**
|
|
@@ -5017,6 +5017,19 @@ class PdfiumNative {
|
|
|
5017
5017
|
rd.bottom
|
|
5018
5018
|
);
|
|
5019
5019
|
}
|
|
5020
|
+
/**
|
|
5021
|
+
* Sets or clears the /BE (border effect) dictionary on an annotation.
|
|
5022
|
+
*
|
|
5023
|
+
* @param annotationPtr pointer to an `FPDF_ANNOTATION`
|
|
5024
|
+
* @param intensity cloudy border intensity, or `undefined` to clear
|
|
5025
|
+
* @returns `true` on success
|
|
5026
|
+
*/
|
|
5027
|
+
setBorderEffect(annotationPtr, intensity) {
|
|
5028
|
+
if (intensity === void 0 || intensity <= 0) {
|
|
5029
|
+
return this.pdfiumModule.EPDFAnnot_ClearBorderEffect(annotationPtr);
|
|
5030
|
+
}
|
|
5031
|
+
return this.pdfiumModule.EPDFAnnot_SetBorderEffect(annotationPtr, intensity);
|
|
5032
|
+
}
|
|
5020
5033
|
/**
|
|
5021
5034
|
* Get the date of the annotation
|
|
5022
5035
|
*
|
|
@@ -5758,7 +5771,6 @@ class PdfiumNative {
|
|
|
5758
5771
|
const opacity = this.getAnnotationOpacity(annotationPtr);
|
|
5759
5772
|
const { width: strokeWidth } = this.getBorderStyle(annotationPtr);
|
|
5760
5773
|
const inkList = this.getInkList(doc, page, annotationPtr);
|
|
5761
|
-
const blendMode = this.pdfiumModule.EPDFAnnot_GetBlendMode(annotationPtr);
|
|
5762
5774
|
const intent = this.getAnnotIntent(annotationPtr);
|
|
5763
5775
|
return {
|
|
5764
5776
|
pageIndex: page.index,
|
|
@@ -5766,7 +5778,6 @@ class PdfiumNative {
|
|
|
5766
5778
|
type: PdfAnnotationSubtype.INK,
|
|
5767
5779
|
rect,
|
|
5768
5780
|
...intent && { intent },
|
|
5769
|
-
blendMode,
|
|
5770
5781
|
strokeColor,
|
|
5771
5782
|
color: strokeColor,
|
|
5772
5783
|
// deprecated alias
|
|
@@ -5811,6 +5822,7 @@ class PdfiumNative {
|
|
|
5811
5822
|
}
|
|
5812
5823
|
}
|
|
5813
5824
|
const rd = this.getRectangleDifferences(annotationPtr);
|
|
5825
|
+
const be = this.getBorderEffect(annotationPtr);
|
|
5814
5826
|
return {
|
|
5815
5827
|
pageIndex: page.index,
|
|
5816
5828
|
id: index,
|
|
@@ -5823,6 +5835,7 @@ class PdfiumNative {
|
|
|
5823
5835
|
strokeStyle,
|
|
5824
5836
|
strokeDashArray,
|
|
5825
5837
|
vertices,
|
|
5838
|
+
...be.ok && { cloudyBorderIntensity: be.intensity },
|
|
5826
5839
|
...rd.ok && {
|
|
5827
5840
|
rectangleDifferences: {
|
|
5828
5841
|
left: rd.left,
|
|
@@ -5940,13 +5953,11 @@ class PdfiumNative {
|
|
|
5940
5953
|
const segmentRects = this.getQuadPointsAnno(doc, page, annotationPtr);
|
|
5941
5954
|
const strokeColor = this.getAnnotationColor(annotationPtr) ?? "#FFFF00";
|
|
5942
5955
|
const opacity = this.getAnnotationOpacity(annotationPtr);
|
|
5943
|
-
const blendMode = this.pdfiumModule.EPDFAnnot_GetBlendMode(annotationPtr);
|
|
5944
5956
|
return {
|
|
5945
5957
|
pageIndex: page.index,
|
|
5946
5958
|
id: index,
|
|
5947
5959
|
type: PdfAnnotationSubtype.HIGHLIGHT,
|
|
5948
5960
|
rect,
|
|
5949
|
-
blendMode,
|
|
5950
5961
|
segmentRects,
|
|
5951
5962
|
strokeColor,
|
|
5952
5963
|
color: strokeColor,
|
|
@@ -5970,13 +5981,11 @@ class PdfiumNative {
|
|
|
5970
5981
|
const segmentRects = this.getQuadPointsAnno(doc, page, annotationPtr);
|
|
5971
5982
|
const strokeColor = this.getAnnotationColor(annotationPtr) ?? "#FF0000";
|
|
5972
5983
|
const opacity = this.getAnnotationOpacity(annotationPtr);
|
|
5973
|
-
const blendMode = this.pdfiumModule.EPDFAnnot_GetBlendMode(annotationPtr);
|
|
5974
5984
|
return {
|
|
5975
5985
|
pageIndex: page.index,
|
|
5976
5986
|
id: index,
|
|
5977
5987
|
type: PdfAnnotationSubtype.UNDERLINE,
|
|
5978
5988
|
rect,
|
|
5979
|
-
blendMode,
|
|
5980
5989
|
segmentRects,
|
|
5981
5990
|
strokeColor,
|
|
5982
5991
|
color: strokeColor,
|
|
@@ -6000,13 +6009,11 @@ class PdfiumNative {
|
|
|
6000
6009
|
const segmentRects = this.getQuadPointsAnno(doc, page, annotationPtr);
|
|
6001
6010
|
const strokeColor = this.getAnnotationColor(annotationPtr) ?? "#FF0000";
|
|
6002
6011
|
const opacity = this.getAnnotationOpacity(annotationPtr);
|
|
6003
|
-
const blendMode = this.pdfiumModule.EPDFAnnot_GetBlendMode(annotationPtr);
|
|
6004
6012
|
return {
|
|
6005
6013
|
pageIndex: page.index,
|
|
6006
6014
|
id: index,
|
|
6007
6015
|
type: PdfAnnotationSubtype.STRIKEOUT,
|
|
6008
6016
|
rect,
|
|
6009
|
-
blendMode,
|
|
6010
6017
|
segmentRects,
|
|
6011
6018
|
strokeColor,
|
|
6012
6019
|
color: strokeColor,
|
|
@@ -6030,13 +6037,11 @@ class PdfiumNative {
|
|
|
6030
6037
|
const segmentRects = this.getQuadPointsAnno(doc, page, annotationPtr);
|
|
6031
6038
|
const strokeColor = this.getAnnotationColor(annotationPtr) ?? "#FF0000";
|
|
6032
6039
|
const opacity = this.getAnnotationOpacity(annotationPtr);
|
|
6033
|
-
const blendMode = this.pdfiumModule.EPDFAnnot_GetBlendMode(annotationPtr);
|
|
6034
6040
|
return {
|
|
6035
6041
|
pageIndex: page.index,
|
|
6036
6042
|
id: index,
|
|
6037
6043
|
type: PdfAnnotationSubtype.SQUIGGLY,
|
|
6038
6044
|
rect,
|
|
6039
|
-
blendMode,
|
|
6040
6045
|
segmentRects,
|
|
6041
6046
|
strokeColor,
|
|
6042
6047
|
color: strokeColor,
|
|
@@ -6393,6 +6398,7 @@ class PdfiumNative {
|
|
|
6393
6398
|
}
|
|
6394
6399
|
}
|
|
6395
6400
|
const rd = this.getRectangleDifferences(annotationPtr);
|
|
6401
|
+
const be = this.getBorderEffect(annotationPtr);
|
|
6396
6402
|
return {
|
|
6397
6403
|
pageIndex: page.index,
|
|
6398
6404
|
id: index,
|
|
@@ -6404,6 +6410,7 @@ class PdfiumNative {
|
|
|
6404
6410
|
strokeColor: strokeColor ?? "#FF0000",
|
|
6405
6411
|
strokeStyle,
|
|
6406
6412
|
...strokeDashArray !== void 0 && { strokeDashArray },
|
|
6413
|
+
...be.ok && { cloudyBorderIntensity: be.intensity },
|
|
6407
6414
|
...rd.ok && {
|
|
6408
6415
|
rectangleDifferences: {
|
|
6409
6416
|
left: rd.left,
|
|
@@ -6442,6 +6449,7 @@ class PdfiumNative {
|
|
|
6442
6449
|
}
|
|
6443
6450
|
}
|
|
6444
6451
|
const rd = this.getRectangleDifferences(annotationPtr);
|
|
6452
|
+
const be = this.getBorderEffect(annotationPtr);
|
|
6445
6453
|
return {
|
|
6446
6454
|
pageIndex: page.index,
|
|
6447
6455
|
id: index,
|
|
@@ -6453,6 +6461,7 @@ class PdfiumNative {
|
|
|
6453
6461
|
strokeWidth,
|
|
6454
6462
|
strokeStyle,
|
|
6455
6463
|
...strokeDashArray !== void 0 && { strokeDashArray },
|
|
6464
|
+
...be.ok && { cloudyBorderIntensity: be.intensity },
|
|
6456
6465
|
...rd.ok && {
|
|
6457
6466
|
rectangleDifferences: {
|
|
6458
6467
|
left: rd.left,
|
|
@@ -6670,6 +6679,7 @@ class PdfiumNative {
|
|
|
6670
6679
|
const custom = this.getAnnotCustom(annotationPtr);
|
|
6671
6680
|
const inReplyToId = this.getInReplyToId(annotationPtr);
|
|
6672
6681
|
const replyType = this.getReplyType(annotationPtr);
|
|
6682
|
+
const blendMode = this.pdfiumModule.EPDFAnnot_GetBlendMode(annotationPtr);
|
|
6673
6683
|
const pdfRotation = this.getAnnotExtendedRotation(annotationPtr);
|
|
6674
6684
|
const rotation = pdfRotation !== 0 ? (360 - pdfRotation) % 360 : 0;
|
|
6675
6685
|
const rawUnrotatedRect = this.readAnnotUnrotatedRect(annotationPtr);
|
|
@@ -6681,6 +6691,7 @@ class PdfiumNative {
|
|
|
6681
6691
|
created,
|
|
6682
6692
|
flags,
|
|
6683
6693
|
custom,
|
|
6694
|
+
blendMode,
|
|
6684
6695
|
// Only include IRT if present
|
|
6685
6696
|
...inReplyToId && { inReplyToId },
|
|
6686
6697
|
// Only include RT if present and not the default (Reply)
|
|
@@ -8548,4 +8559,4 @@ export {
|
|
|
8548
8559
|
isValidCustomKey as i,
|
|
8549
8560
|
readArrayBuffer as r
|
|
8550
8561
|
};
|
|
8551
|
-
//# sourceMappingURL=direct-engine-
|
|
8562
|
+
//# sourceMappingURL=direct-engine-D-Jf9yyY.js.map
|