node-poppler 7.2.2 → 7.2.3

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019-2023 Frazer Smith
3
+ Copyright (c) 2019-2025 Frazer Smith
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![GitHub release](https://img.shields.io/github/release/Fdawgs/node-poppler.svg)](https://github.com/Fdawgs/node-poppler/releases/latest/)
4
4
  [![npm version](https://img.shields.io/npm/v/node-poppler)](https://npmjs.com/package/node-poppler)
5
- [![Build status](https://github.com/Fdawgs/node-poppler/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Fdawgs/node-poppler/actions/workflows/ci.yml)
5
+ [![CI](https://github.com/Fdawgs/node-poppler/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Fdawgs/node-poppler/actions/workflows/ci.yml)
6
6
  [![Coverage status](https://coveralls.io/repos/github/Fdawgs/node-poppler/badge.svg?branch=main)](https://coveralls.io/github/Fdawgs/node-poppler?branch=main)
7
7
  [![code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)
8
8
 
@@ -63,7 +63,7 @@ const res = await poppler.pdfToCairo(file, outputFile, options);
63
63
  console.log(res);
64
64
  ```
65
65
 
66
- Example of an `async` `await` call to `poppler.pdfToCairo()`, to convert only the first of a PDF file to a new
66
+ Example of an `async` `await` call to `poppler.pdfToCairo()`, to convert only the first page of a PDF file to a new
67
67
  PDF file using stdout:
68
68
 
69
69
  ```js
@@ -166,12 +166,12 @@ Please adhere to this project's [Code of Conduct](https://github.com/Fdawgs/.git
166
166
 
167
167
  ## Acknowledgements
168
168
 
169
- - [**Albert Astals Cid**](https://github.com/albert-astals-cid-kdab) - [Poppler](https://poppler.freedesktop.org/) developer
170
- - [**Filipe Fernandes**](https://github.com/ocefpaf/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
171
- - [**Peter Williams**](https://github.com/pkgw/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
172
- - [**Owen Schwartz**](https://github.com/oschwartz10612) - [poppler-windows](https://github.com/oschwartz10612/poppler-windows) developer
173
- - [**Uwe Korn**](https://github.com/xhochy/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
174
- - [**Xylar Asay-Davis**](https://github.com/xylar/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
169
+ - [**Albert Astals Cid**](https://github.com/albert-astals-cid-kdab) - [Poppler](https://poppler.freedesktop.org/) developer
170
+ - [**Filipe Fernandes**](https://github.com/ocefpaf/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
171
+ - [**Peter Williams**](https://github.com/pkgw/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
172
+ - [**Owen Schwartz**](https://github.com/oschwartz10612) - [poppler-windows](https://github.com/oschwartz10612/poppler-windows) developer
173
+ - [**Uwe Korn**](https://github.com/xhochy/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
174
+ - [**Xylar Asay-Davis**](https://github.com/xylar/) - [poppler-feedstock](https://github.com/conda-forge/poppler-feedstock) maintainer
175
175
 
176
176
  ## License
177
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-poppler",
3
- "version": "7.2.2",
3
+ "version": "7.2.3",
4
4
  "description": "Asynchronous node.js wrapper for the Poppler PDF rendering library",
5
5
  "keywords": [
6
6
  "async",
package/src/index.js CHANGED
@@ -1530,7 +1530,9 @@ class Poppler {
1530
1530
  child.on("close", (code) => {
1531
1531
  /* istanbul ignore else */
1532
1532
  if (stdOut !== "") {
1533
- resolve(stdOut.trim());
1533
+ resolve(
1534
+ options.maintainLayout ? stdOut : stdOut.trim()
1535
+ );
1534
1536
  } else if (code === 0) {
1535
1537
  resolve(errorMessages[code]);
1536
1538
  } else if (stdErr !== "") {
package/types/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export class Poppler {
8
8
  * if a local installation is not found.
9
9
  */
10
10
  constructor(binPath?: string);
11
- popplerPath: string | undefined;
11
+ popplerPath: string;
12
12
  /**
13
13
  * @author Frazer Smith
14
14
  * @description Embeds files (attachments) into a PDF file.