0.2.4 • Published 7 years ago

prince-promise v0.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

prince-promise

Convert HTML to PDF using a promise based api for PrinceXML.

npm version npm license Travis David npm downloads

Installation

npm install prince-promise

Usage

var prince = require('prince-promise');

var html = 'Hello';
var options = {
  licenseFile: 'path',
  encrypt: true
};

prince(html)
  .then(function (pdf) {
    // ...
  });

API


prince ( html , options )

Converts an HTML string to a PDF. Returns a Promise that is fulfilled with the pdf buffer.

Arguments

  • html - A string of HTML content to render.
  • options - An object of options to run prince with. All PrinceXml options are supported and should be set as camelCased properties of this object.

    For instance:

    prince --license-file=path  --encrypt

    Becomes:

    var options = {
      licenseFile: 'path',
      encrypt: true
    };
0.2.4

7 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago