Client module to query PDFify server.
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
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);
});