A js wrapper to pdfinfo
JavaScript Makefile
Switch branches/tags
Latest commit 475b5dc Aug 22, 2016 @iapain iapain version bump
Permalink
Failed to load latest commit information.
lib Fixed to reference shell stdout instead of depreciated output May 18, 2016
test Do not parse err Mar 21, 2013
.gitignore initial import Nov 21, 2012
.travis.yml updates travis config Aug 22, 2016
AUTHORS added email Feb 22, 2013
LICENSE version bumped Dec 5, 2012
Makefile initial import Nov 21, 2012
README.md Do not parse err Mar 21, 2013
index.js initial import Nov 21, 2012
package.json version bump Aug 22, 2016

README.md

pdfinfojs - pdfinfo shell wrapper for Node.js

Build Status pdfinfojs provides access to pdfinfo via shell in nodejs.

Installation

via npm:

$ npm install pdfinfojs

Usage

Asynchronus example

var pdfinfo = require('pdfinfojs'),
    pdf = new pdfinfo('test/pdfs/sample.pdf');

pdf.getInfo(function(err, info, params) {
  if (err) {
    console.error(err.stack);
  }
  else {
    console.log(info); //info is an object
    console.log(params); // commandline params passed to pdfinfo cmd
  }
});

Synchronous Example

var pdfinfo = require('pdfinfojs'),
    pdf = new pdfinfo('test/pdfs/sample.pdf');

var data = pdf.getInfoSync();
console.log(data);

Tests

$ npm test

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

$ npm test-cov