0.1.6 • Published 8 years ago

wkhtmltopdf-promise v0.1.6

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

wkhtmltopdf-promise

Convert HTML to PDF using Webkit (QtWebKit), wrapped in a Promise

Example

const wkhtmltopdfPromise = require('wkhtmltopdf-promise');

wkhtmltopdfPromise(`
<body>
    <div>Content</div>
</body>
`).then(function (pdf_base64) {
    // Handle base64 output
}).catch(function (err) {
    console.error(err); 
});

Options

There are many options available to wkhtmltopdf. All of the command line options are supported as documented on the page linked to above. The options are camelCased instead-of-dashed as in the command line tool. Note that options that do not have values, must be specified as a boolean, e.g. debugJavascript: true

{
    "options":
    {
        "pageSize": "letter"
    }
}
0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago