@heripo/pdf-parser 0.1.19 → 0.1.21
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/index.cjs +26 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -3571,14 +3571,32 @@ var PDFConverter = class {
|
|
|
3571
3571
|
},
|
|
3572
3572
|
this.timeout
|
|
3573
3573
|
);
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3574
|
+
try {
|
|
3575
|
+
return await chunked.convertChunked(
|
|
3576
|
+
url,
|
|
3577
|
+
reportId,
|
|
3578
|
+
onComplete,
|
|
3579
|
+
cleanupAfterCallback,
|
|
3580
|
+
options,
|
|
3581
|
+
abortSignal
|
|
3582
|
+
);
|
|
3583
|
+
} catch (error) {
|
|
3584
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
3585
|
+
throw error;
|
|
3586
|
+
}
|
|
3587
|
+
this.logger.warn(
|
|
3588
|
+
"[PDFConverter] Chunked conversion failed, retrying with image-based PDF...",
|
|
3589
|
+
error instanceof Error ? error.message : error
|
|
3590
|
+
);
|
|
3591
|
+
return this.convertViaImagePdf(
|
|
3592
|
+
url,
|
|
3593
|
+
reportId,
|
|
3594
|
+
onComplete,
|
|
3595
|
+
cleanupAfterCallback,
|
|
3596
|
+
options,
|
|
3597
|
+
abortSignal
|
|
3598
|
+
);
|
|
3599
|
+
}
|
|
3582
3600
|
}
|
|
3583
3601
|
if (options.forceImagePdf) {
|
|
3584
3602
|
return this.convertViaImagePdf(
|