-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
As currently written, the examples will have undesired behavior - ignoring the options object passed in.
For ex:
extract(filePath, { splitPages: false }, function (err, text) {
if (err) {
console.dir(err)
return
}
console.dir(text)
})
Referencing code
module.exports = function pdfTextExtract (filePath, options, pdfToTextCommand, cb) {
if (typeof (pdfToTextCommand) === 'function') {
cb = pdfToTextCommand
pdfToTextCommand = 'pdftotext'
options = {}
}
}
Working example, not ignoring options parameter -
var path = require('path')
var filePath = path.join(__dirname, '/document.pdf')
var extract = require('pdf-text-extract')
extract(filePath, { splitPages: false }, 'pdftotext', function (err, text) {
if (err) {
console.dir(err)
return
}
console.dir(text)
})
Metadata
Metadata
Assignees
Labels
No labels