pdftotextjs

Extracts text from pdf with pdftotext (poppler)

pdftotextjs provides access to pdftotext via shell in nodejs.

via npm:

$ npm install pdftotextjs
var pdftotext = require('pdftotextjs'),
    ptext = new pdftotext('tests/pdfs/sample.pdf');
 
ptext.success(function(i) {
  console.log(i);
});
 
ptext.error(function(error) {
  console.log("conversion error: " + error);
});
 
ptext.get();
$ npm test

Coverage (Make sure you have installed jscoverage (it's easy sudo aptitude install jscoverage or brew jscoverage)

$ npm test-cov