@heripo/pdf-parser 0.1.20 → 0.1.22
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 +9 -8
package/dist/index.cjs
CHANGED
|
@@ -3588,14 +3588,32 @@ var PDFConverter = class {
|
|
|
3588
3588
|
},
|
|
3589
3589
|
this.timeout
|
|
3590
3590
|
);
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3591
|
+
try {
|
|
3592
|
+
return await chunked.convertChunked(
|
|
3593
|
+
url,
|
|
3594
|
+
reportId,
|
|
3595
|
+
onComplete,
|
|
3596
|
+
cleanupAfterCallback,
|
|
3597
|
+
options,
|
|
3598
|
+
abortSignal
|
|
3599
|
+
);
|
|
3600
|
+
} catch (error) {
|
|
3601
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
3602
|
+
throw error;
|
|
3603
|
+
}
|
|
3604
|
+
this.logger.warn(
|
|
3605
|
+
"[PDFConverter] Chunked conversion failed, retrying with image-based PDF...",
|
|
3606
|
+
error instanceof Error ? error.message : error
|
|
3607
|
+
);
|
|
3608
|
+
return this.convertViaImagePdf(
|
|
3609
|
+
url,
|
|
3610
|
+
reportId,
|
|
3611
|
+
onComplete,
|
|
3612
|
+
cleanupAfterCallback,
|
|
3613
|
+
options,
|
|
3614
|
+
abortSignal
|
|
3615
|
+
);
|
|
3616
|
+
}
|
|
3599
3617
|
}
|
|
3600
3618
|
if (options.forceImagePdf) {
|
|
3601
3619
|
return this.convertViaImagePdf(
|