Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFBucket Build Status

PDFBucket module allows you to integrate easily with the PDFBucket service. Automatically tested against 0.12, 4, 5 and 6 node versions.

Installation

$ npm install pdfbucket --save

Usage

To encrypt a URL in your code instantiate a PDFBucket object and use its generateUrl method. The new pdfBucket will use PDF_BUCKET_API_KEY, PDF_BUCKET_API_SECRET, PDF_BUCKET_API_HOST (default is api.pdfbucket.io) ENV vars:

var PDFBucket = require('pdfbucket'),
    pdfBucket = new PDFBucket();

You can also set any the api params, overwriting then ENV vars like this:

var otherPDFBucket = new PDFBucket({apiKey: "ABCDEFGHIJKLMNO", apiSecret: "1234567890ABCDE", apiHost: "api.example.com"});

And you get the encryptedUrl using the generateUrl method:

var encryptedUrl = pdfBucket.generateUrl("http://example.com", "landscape", "A4", "2px", "0.7");

Also you can pass the plain URL to PDFBucket

var plainUrl = pdfBucket.generatePlainUrl("http://example.com", "landscape", "A4", "2px", "0.7");

About

PDFBucket integration library

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages