Describe the bug
When attempting to burst a PDF that has an owner password set, node-pdftk throws an error with the warning from pdftk even though ignoreWarnings is set to true and pdftk returns a 0 exit code from the same command.
To Reproduce
Grab this PDF to use for input in the below code: http://www.orimi.com/pdf-test.pdf
Code to reproduce:
const pdftk = require('node-pdftk')
pdftk.configure({ignoreWarnings: true})
pdftk.input('/tmp/pdf-test.pdf').burst().then(() => console.log('Success')).catch((err) => console.error(err))
Output:
Promise {
<pending>,
domain:
Domain {
domain: null,
_events: { error: [Function: debugDomainError] },
_eventsCount: 1,
_maxListeners: undefined,
members: [] } }
> WARNING: The creator of the input PDF:
/tmp/pdf-test.pdf
has set an owner password (which is not required to handle this PDF).
You did not supply this password. Please respect any copyright.
Running pdftk /tmp/pdf-test.pdf burst outputs the warning but returns a 0 exit code.
Expected behavior
An error shouldn't be thrown since I'm ignoring warnings.
Describe the bug
When attempting to burst a PDF that has an owner password set, node-pdftk throws an error with the warning from pdftk even though
ignoreWarningsis set to true and pdftk returns a 0 exit code from the same command.To Reproduce
Grab this PDF to use for input in the below code: http://www.orimi.com/pdf-test.pdf
Code to reproduce:
Output:
Running
pdftk /tmp/pdf-test.pdf burstoutputs the warning but returns a 0 exit code.Expected behavior
An error shouldn't be thrown since I'm ignoring warnings.