Skip to content

Commit

Permalink
feat(index): add new savefile option to pdfdetach function
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Apr 14, 2020
1 parent 400bb80 commit c6c7d9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Lists or extracts embedded files (attachments) from a PDF file.
| [options.outputPath] | <code>String</code> | Set the file name used when saving an embedded file with the save option enabled, or the directory if the 'saveall' option is used. |
| [options.printVersionInfo] | <code>Boolean</code> | Print copyright and version info. |
| [options.saveAllFiles] | <code>Boolean</code> | Save all of the embedded files. This uses the file names associated with the embedded files (as printed by the 'listEmbedded' option). By default, the files are saved in the current directory; this can be changed with the 'outputPath' option. |
| [options.saveFile] | <code>String</code> | Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by the 'listEmbedded' option); the file name can be changed with the 'outputPath' option. |
| [options.saveSpecificFile] | <code>Number</code> | Save the specified embedded file. By default, this uses the file name associated with the embedded file (as printed by the 'listEmbedded' option); the file name can be changed with the 'outputPath' option. |
| [options.userPassword] | <code>String</code> | User password (for encrypted files). |
| file | <code>String</code> | Filepath of the PDF file to read. |
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ class Poppler {
* names associated with the embedded files (as printed by the 'listEmbedded' option).
* By default, the files are saved in the current directory; this can be changed
* with the 'outputPath' option.
* @param {String=} options.saveFile - Save the specified embedded file.
* By default, this uses the file name associated with the embedded file (as printed by the
* 'listEmbedded' option); the file name can be changed with the 'outputPath' option.
* @param {Number=} options.saveSpecificFile - Save the specified embedded file.
* By default, this uses the file name associated with the embedded file (as printed by the
* 'listEmbedded' option); the file name can be changed with the 'outputPath' option.
Expand All @@ -160,6 +163,7 @@ class Poppler {
outputEncoding: { arg: '-enc', type: 'string' },
outputPath: { arg: '-o', type: 'string' },
printVersionInfo: { arg: '-v', type: 'boolean' },
saveFile: { arg: '-savefile', type: 'string' },
saveAllFiles: { arg: '-saveall', type: 'boolean' },
saveSpecificFile: { arg: '-save', type: 'number' },
userPassword: { arg: '-upw', type: 'string' }
Expand Down

0 comments on commit c6c7d9c

Please sign in to comment.