jjwilly16 / node-pdftk

A wrapper for PDF Toolkit with streams and promises.
MIT License
141 stars 34 forks source link

if pdftk waring, this program will throw err #33

Closed lanceInGz closed 4 years ago

lanceInGz commented 4 years ago

i think this is a mistake in output method. when pdftk throw a waring, even if i set ignoreWarnings() , but not use, this programe still throw err . and then ,i found this code have mistake.

 if (!(this._ignoreWarnings && data.toString().toLowerCase().includes('error'))) {

it should be

 if (!(this._ignoreWarnings && !data.toString().toLowerCase().includes('error'))) {

miss '!' before data.toString()

jjwilly16 commented 4 years ago

Fixed in 2.1.2. Thanks!