Javascript module for pdfgeneratorapi.com
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
index.js
package.json
readme.md

readme.md

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