pdf-generator-api

JavaScript module for pdfgeneratorapi.com

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
pdf-generator-api
301.1.05 years ago6 years agoMinified + gzip package size for pdf-generator-api in KB

Readme

JavaScript module for pdfgeneratorapi.com
JavaScript module for PDF Generator API.

Install

Require this package with npm using the following command:
npm install pdf-generator-api --save

Usage

let Client = new PDFGeneratorAPI(
  '{your_api_key}',
  '{your_api_secret}'
);
Client.setBaseUrl('https://us1.pdfgeneratorapi.com/api/v3/');
Client.setWorkspace('{unique_workspace_identifier}');

Client.getAll().then(function(response) {
    // response.response => list of templates available for users
});

Client.output('{template_id_retrived_with_getAll}', {"key": "Object, Array or url to data file"}).then(function(response) {
    // response.response => base64 document
    // response.meta => document meta data e.g name, content-type, encoding etc
});