0.0.0 • Published 10 years ago

elpdf v0.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

EL PDF

El Pdf is a node wrapper for the HyPDF Heroku add-on. It uses the built-in https module.

elpdf.htmlToPdf({
  user: process.env.HYPDF_USER,
  password: process.env.HYPDF_PASSWORD,
  content: '<html><body><p>This is some text</p></body></html>',
  test: true
}, function(err, res) {
  assert(!err, err);
  var output = fs.createWriteStream(outputFilename);
  res.pipe(output);
});

Running the tests

You need to set the HYPDF_USER and HYPDF_PASSWORD environmental variables in your shell. These are provided by Heroku.

To run the test, type npm test in your shell.