pdftohtmljs

PDF to HTML (pdf2htmlex) shell wrapper

npm install pdftohtmljs
10 downloads in the last day
33 downloads in the last week
99 downloads in the last month

pdftohtmljs - pdf2htmlEx shell wrapper for Node.js

Build Status pdftohtmljs provides access to pdf2htmlEX via shell in node.js programs. Current version uses ShellJS for platform independent execution of shell commands.

Installation

via npm:

npm install pdftohtmljs

Usage

var pdftohtml = require('pdftohtmljs'),
    converter = new pdftohtml('test/pdfs/sample.pdf', "sample.html");

converter.preset('default');

converter.success(function() {
  console.log("convertion done");
});

converter.error(function(error) {
  console.log("conversion error: " + error);
});

converter.progress(function(ret) {
  console.log ((ret.current*100.0)/ret.total + " %");
});

converter.convert();

Command line usage

npm install pdftohtmljs -g
pdftohtmljs sample.pdf

You may optionally provide your own filename and preset

pdftohtmljs sample.pdf sample.html ipad

Tests

$ npm test

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

$ npm test-cov
npm loves you