node-poppler 7.2.0 → 7.2.1

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/README.md CHANGED
@@ -30,8 +30,7 @@ For Linux users, you will need to download the `poppler-data` and `poppler-utils
30
30
  An example of downloading the binaries on a Debian system:
31
31
 
32
32
  ```
33
- sudo apt-get install poppler-data
34
- sudo apt-get install poppler-utils
33
+ sudo apt-get install poppler-data poppler-utils
35
34
  ```
36
35
 
37
36
  For macOS users, you can download the latest versions with [Homebrew](https://brew.sh/):
@@ -145,9 +144,10 @@ const options = {
145
144
  firstPageToConvert: 1,
146
145
  lastPageToConvert: 2,
147
146
  };
147
+ const outputFile = "test_document.txt";
148
148
 
149
149
  poppler
150
- .pdfToText(file, options)
150
+ .pdfToText(file, outputFile, options)
151
151
  .then((res) => {
152
152
  console.log(res);
153
153
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-poppler",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "Asynchronous node.js wrapper for the Poppler PDF rendering library",
5
5
  "keywords": [
6
6
  "async",
@@ -44,14 +44,14 @@
44
44
  "url": "https://github.com/Fdawgs/node-poppler/issues"
45
45
  },
46
46
  "license": "MIT",
47
- "author": "Frazer Smith <frazer.dev@outlook.com>",
47
+ "author": "Frazer Smith <frazer.dev@icloud.com>",
48
48
  "funding": "https://github.com/sponsors/Fdawgs",
49
49
  "engines": {
50
- "node": ">=18.0.0"
50
+ "node": ">=18"
51
51
  },
52
52
  "dependencies": {
53
53
  "camelcase": "^6.3.0",
54
- "semver": "^7.6.0",
54
+ "semver": "^7.6.3",
55
55
  "upath": "^2.0.1"
56
56
  }
57
57
  }
package/types/index.d.ts CHANGED
@@ -305,7 +305,7 @@ export class Poppler {
305
305
  * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
306
306
  */
307
307
  pdfToCairo(file: Buffer | string, outputFile?: string, options?: {
308
- antialias?: ('best' | 'default' | 'fast' | 'good' | 'gray' | 'none' | 'subpixel');
308
+ antialias?: ("best" | "default" | "fast" | "good" | "gray" | "none" | "subpixel");
309
309
  cropBox?: boolean;
310
310
  cropHeight?: number;
311
311
  cropSize?: number;
@@ -330,7 +330,7 @@ export class Poppler {
330
330
  originalPageSizes?: boolean;
331
331
  ownerPassword?: string;
332
332
  paperHeight?: number;
333
- paperSize?: ('A3' | 'A4' | 'legal' | 'letter' | 'match');
333
+ paperSize?: ("A3" | "A4" | "legal" | "letter" | "match");
334
334
  paperWidth?: number;
335
335
  pdfFile?: boolean;
336
336
  pngFile?: boolean;
@@ -348,7 +348,7 @@ export class Poppler {
348
348
  scalePageToYAxis?: number;
349
349
  singleFile?: boolean;
350
350
  svgFile?: boolean;
351
- tiffCompression?: ('deflate' | 'jpeg' | 'lzw' | 'none' | 'packbits');
351
+ tiffCompression?: ("deflate" | "jpeg" | "lzw" | "none" | "packbits");
352
352
  tiffFile?: boolean;
353
353
  transparentPageColor?: boolean;
354
354
  userPassword?: string;
@@ -401,7 +401,7 @@ export class Poppler {
401
401
  firstPageToConvert?: number;
402
402
  fontFullName?: boolean;
403
403
  ignoreImages?: boolean;
404
- imageFormat?: ('JPG' | 'PNG');
404
+ imageFormat?: ("JPG" | "PNG");
405
405
  lastPageToConvert?: number;
406
406
  noDrm?: boolean;
407
407
  noFrames?: boolean;
@@ -493,8 +493,8 @@ export class Poppler {
493
493
  * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
494
494
  */
495
495
  pdfToPpm(file: Buffer | string, outputPath: string, options?: {
496
- antialiasFonts?: ('no' | 'yes');
497
- antialiasVectors?: ('no' | 'yes');
496
+ antialiasFonts?: ("no" | "yes");
497
+ antialiasVectors?: ("no" | "yes");
498
498
  cropBox?: boolean;
499
499
  cropHeight?: number;
500
500
  cropSize?: number;
@@ -507,7 +507,7 @@ export class Poppler {
507
507
  displayProfile?: string;
508
508
  evenPagesOnly?: boolean;
509
509
  firstPageToConvert?: number;
510
- freetype?: ('no' | 'yes');
510
+ freetype?: ("no" | "yes");
511
511
  forcePageNumber?: boolean;
512
512
  grayscaleFile?: boolean;
513
513
  hideAnnotations?: boolean;
@@ -528,8 +528,8 @@ export class Poppler {
528
528
  scalePageToYAxis?: number;
529
529
  separator?: string;
530
530
  singleFile?: boolean;
531
- thinLineMode?: ('none' | 'shape' | 'solid');
532
- tiffCompression?: ('deflate' | 'jpeg' | 'lzw' | 'none' | 'packbits');
531
+ thinLineMode?: ("none" | "shape" | "solid");
532
+ tiffCompression?: ("deflate" | "jpeg" | "lzw" | "none" | "packbits");
533
533
  tiffFile?: boolean;
534
534
  userPassword?: string;
535
535
  }): Promise<string>;
@@ -643,7 +643,7 @@ export class Poppler {
643
643
  * @returns {Promise<string>} A promise that resolves with a stdout string, or rejects with an `Error` object.
644
644
  */
645
645
  pdfToPs(file: Buffer | string, outputFile?: string, options?: {
646
- antialias?: ('no' | 'yes');
646
+ antialias?: ("no" | "yes");
647
647
  binary?: boolean;
648
648
  defaultCmykProfile?: string;
649
649
  defaultGrayProfile?: string;
@@ -673,15 +673,15 @@ export class Poppler {
673
673
  overprint?: boolean;
674
674
  ownerPassword?: string;
675
675
  paperHeight?: number;
676
- paperSize?: ('A3' | 'A4' | 'legal' | 'letter' | 'match');
676
+ paperSize?: ("A3" | "A4" | "legal" | "letter" | "match");
677
677
  paperWidth?: number;
678
678
  passfonts?: boolean;
679
679
  preload?: boolean;
680
680
  printVersionInfo?: boolean;
681
- processColorFormat?: ('CMYK8' | 'MONO8' | 'RGB8');
681
+ processColorFormat?: ("CMYK8" | "MONO8" | "RGB8");
682
682
  processColorProfile?: string;
683
683
  quiet?: boolean;
684
- rasterize?: ('always' | 'never' | 'whenneeded');
684
+ rasterize?: ("always" | "never" | "whenneeded");
685
685
  resolutionXYAxis?: number;
686
686
  userPassword?: string;
687
687
  }): Promise<string>;
@@ -741,7 +741,7 @@ export class Poppler {
741
741
  cropWidth?: number;
742
742
  cropXAxis?: number;
743
743
  cropYAxis?: number;
744
- eolConvention?: ('dos' | 'mac' | 'unix');
744
+ eolConvention?: ("dos" | "mac" | "unix");
745
745
  firstPageToConvert?: number;
746
746
  fixedWidthLayout?: number;
747
747
  generateHtmlMetaFile?: boolean;