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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.3.2
4
+
5
+ ### Fixes
6
+ * 🐛 use PDF length instead of cut PDF size limit
7
+
3
8
  ## v1.3.1
4
9
 
5
10
  ### Fixes
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindee",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Mindee Client Library for Node.js",
5
5
  "main": "mindee/index.js",
6
6
  "license": "MIT",