node-pdfify-client
v1.0.0
Published
PDFify Node.js client. Convert HTML to PDF
Downloads
8
Maintainers
Readme
PDFify Node.js client
Client module to query PDFify server.
Installation
With the command below you will install PDFify client package and it will be added to your app package.json dependencies.
npm install --save pdfify-client
Usage
PDFify client exposes only one method convert(params)
.
You can view available params
in PDFify
Readme.md Parameters section
const PDFifyClient = require('pdfify-client');
const fs = require('fs');
let client = new PDFifyClient({
baseUrl: 'http://localhost:3000'
});
client.convert({
url: 'https://news.ycombinator.com'
}).then((body) => {
console.log(body);
fs.writeFile('hn.pdf', body, 'binary', () => {});
}).catch((err) => {
console.log(err);
});