Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(index): add printDocStruct option to pdfToCairo #552

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ Converts a PDF file to EPS/JPEG/PDF/PNG/PS/SVG/TIFF.
| [options.pdfFile] | <code>boolean</code> | Generate PDF file. |
| [options.pngFile] | <code>boolean</code> | Generate PNG file(s). |
| [options.printVersionInfo] | <code>boolean</code> | Print copyright and version information. |
| [options.printDocStruct] | <code>boolean</code> | If the input file contains structural information about the document's content, write this information to the output file (PDF only). |
| [options.psFile] | <code>boolean</code> | Generate PS file. |
| [options.psLevel2] | <code>boolean</code> | Generate Level 2 PostScript (PS only). |
| [options.psLevel3] | <code>boolean</code> | Generate Level 3 PostScript (PS only). This enables all Level 2 features plus shading patterns and masked images. This is the default setting. |
Expand Down
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Poppler {
__dirname,
"lib",
"win32",
"poppler-23.07.0",
"poppler-23.11.0",
"Library",
"bin"
);
Expand Down Expand Up @@ -665,6 +665,8 @@ class Poppler {
* @param {boolean} [options.pdfFile] - Generate PDF file.
* @param {boolean} [options.pngFile] - Generate PNG file(s).
* @param {boolean} [options.printVersionInfo] - Print copyright and version information.
* @param {boolean} [options.printDocStruct] - If the input file contains structural information
* about the document's content, write this information to the output file (PDF only).
* @param {boolean} [options.psFile] - Generate PS file.
* @param {boolean} [options.psLevel2] - Generate Level 2 PostScript (PS only).
* @param {boolean} [options.psLevel3] - Generate Level 3 PostScript (PS only). This enables all
Expand Down Expand Up @@ -726,6 +728,11 @@ class Poppler {
paperWidth: { arg: "-paperw", type: "number" },
pdfFile: { arg: "-pdf", type: "boolean" },
pngFile: { arg: "-png", type: "boolean" },
printDocStruct: {
arg: "-struct",
type: "boolean",
minVersion: "23.11.0",
},
printVersionInfo: { arg: "-v", type: "boolean" },
psFile: { arg: "-ps", type: "boolean" },
psLevel2: { arg: "-level2", type: "boolean" },
Expand Down
2 changes: 1 addition & 1 deletion src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const windowsPath = joinSafe(
__dirname,
"lib",
"win32",
"poppler-23.07.0",
"poppler-23.11.0",
"Library",
"bin"
);
Expand Down
Binary file removed src/lib/win32/poppler-23.07.0/Library/bin/cairo.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/lib/win32/poppler-23.07.0/Library/bin/jpeg8.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/lib/win32/poppler-23.07.0/Library/bin/zstd.dll
Binary file not shown.
Binary file removed src/lib/win32/poppler-23.07.0/Library/bin/zstd.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading