mindee 1.3.1 → 1.3.2
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/CHANGELOG.md +5 -0
- package/mindee/inputs.js +1 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/mindee/inputs.js
CHANGED
|
@@ -143,10 +143,7 @@ class Input {
|
|
|
143
143
|
const splitedPdfDocument = await PDFDocument.create();
|
|
144
144
|
const pdfLength = pdfDocument.getPageCount();
|
|
145
145
|
if (pdfLength <= this.CUT_PDF_SIZE) return;
|
|
146
|
-
const pagesNumbers = [
|
|
147
|
-
...Array(this.CUT_PDF_SIZE - 1).keys(),
|
|
148
|
-
pdfLength - 1,
|
|
149
|
-
];
|
|
146
|
+
const pagesNumbers = [...Array(pdfLength - 1).keys(), pdfLength - 1];
|
|
150
147
|
const pages = await splitedPdfDocument.copyPages(pdfDocument, pagesNumbers);
|
|
151
148
|
pages.forEach((page) => splitedPdfDocument.addPage(page));
|
|
152
149
|
const data = await splitedPdfDocument.save();
|