Skip to content

pdfbucket/pdfbucket-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFBucket Build Status

PDFBucket library allows you to integrate easily with the PDFBucket service. Automatically tested against Java version 6, 7, and 8.

Installation Download

You can install this package via Maven or Gradle using the jcenter repository:

Maven:

<dependency>
  <groupId>io.pdfbucket</groupId>
  <artifactId>pdfbucket</artifactId>
  <version>$VERSION</version>
  <type>pom</type>
</dependency>

Gradle:

compile 'io.pdfbucket:pdfbucket:$VERSION'

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:

import io.pdfbucket.pdfbucket.PDFBucket;
...

PDFBucket pdfBucket = new PDFBucket.Builder().build();

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

PDFBucket otherPDFBucket = new PDFBucket.Builder()
  .apiKey("ABCDEFGHIJKLMNO")
  .apiSecret("1234567890ABCDE")
  .apiHost("api.example.com")
  .build();

And you get the encryptedUrl using the generateUrl method (To use encryption you need to install JCE http://stackoverflow.com/a/6481658/491957):

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

Also you can pass the plain URL to PDFBucket

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

About

PDFBucket integration library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages