1.0.0 • Published 7 years ago

node-pdfify-client v1.0.0

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

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);
});