@chialab/pdfjs-lib 1.0.0-alpha.5 → 1.0.0-alpha.6
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/browser/index.js +4 -3
- package/dist/node/index.js +4 -3
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -24603,7 +24603,8 @@ PDFPageProxy.prototype.getAnnotations = async function(params) {
|
|
|
24603
24603
|
let currentFillColor = null;
|
|
24604
24604
|
let currentLineWidth = null;
|
|
24605
24605
|
for (const { fn, args } of opList) {
|
|
24606
|
-
|
|
24606
|
+
const finalFn = fn === OPS.constructPath ? args[0] : fn;
|
|
24607
|
+
if (finalFn === OPS.fill) {
|
|
24607
24608
|
if (currentFillColor) {
|
|
24608
24609
|
annotation.interiorColor = currentFillColor;
|
|
24609
24610
|
currentFillColor = null;
|
|
@@ -24615,7 +24616,7 @@ PDFPageProxy.prototype.getAnnotations = async function(params) {
|
|
|
24615
24616
|
firstFill = false;
|
|
24616
24617
|
continue;
|
|
24617
24618
|
}
|
|
24618
|
-
if (
|
|
24619
|
+
if (finalFn === OPS.stroke || finalFn === OPS.closeStroke) {
|
|
24619
24620
|
if (currentLineWidth === null) {
|
|
24620
24621
|
annotation.borderStyle.width = 1;
|
|
24621
24622
|
}
|
|
@@ -24623,7 +24624,7 @@ PDFPageProxy.prototype.getAnnotations = async function(params) {
|
|
|
24623
24624
|
currentLineWidth = null;
|
|
24624
24625
|
continue;
|
|
24625
24626
|
}
|
|
24626
|
-
if (
|
|
24627
|
+
if (finalFn === OPS.fillStroke || finalFn === OPS.closeFillStroke) {
|
|
24627
24628
|
if (currentFillColor) {
|
|
24628
24629
|
annotation.interiorColor = currentFillColor;
|
|
24629
24630
|
currentFillColor = null;
|
package/dist/node/index.js
CHANGED
|
@@ -24913,7 +24913,8 @@ PDFPageProxy.prototype.getAnnotations = async function(params) {
|
|
|
24913
24913
|
let currentFillColor = null;
|
|
24914
24914
|
let currentLineWidth = null;
|
|
24915
24915
|
for (const { fn, args } of opList) {
|
|
24916
|
-
|
|
24916
|
+
const finalFn = fn === OPS.constructPath ? args[0] : fn;
|
|
24917
|
+
if (finalFn === OPS.fill) {
|
|
24917
24918
|
if (currentFillColor) {
|
|
24918
24919
|
annotation.interiorColor = currentFillColor;
|
|
24919
24920
|
currentFillColor = null;
|
|
@@ -24925,7 +24926,7 @@ PDFPageProxy.prototype.getAnnotations = async function(params) {
|
|
|
24925
24926
|
firstFill = false;
|
|
24926
24927
|
continue;
|
|
24927
24928
|
}
|
|
24928
|
-
if (
|
|
24929
|
+
if (finalFn === OPS.stroke || finalFn === OPS.closeStroke) {
|
|
24929
24930
|
if (currentLineWidth === null) {
|
|
24930
24931
|
annotation.borderStyle.width = 1;
|
|
24931
24932
|
}
|
|
@@ -24933,7 +24934,7 @@ PDFPageProxy.prototype.getAnnotations = async function(params) {
|
|
|
24933
24934
|
currentLineWidth = null;
|
|
24934
24935
|
continue;
|
|
24935
24936
|
}
|
|
24936
|
-
if (
|
|
24937
|
+
if (finalFn === OPS.fillStroke || finalFn === OPS.closeFillStroke) {
|
|
24937
24938
|
if (currentFillColor) {
|
|
24938
24939
|
annotation.interiorColor = currentFillColor;
|
|
24939
24940
|
currentFillColor = null;
|
package/package.json
CHANGED