Skip to content

pdfbucket/pdfbucket-c-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFBucket Build Status

PDFBucket package allows you to integrate easily with the PDFBucket service. Tested against 4.5, 4.5.1, 4.5.2, 4.6 and 4.6.1 .NET Framework versions.

Installation

To install PDFBucket nuget package, run the following command in the Package Manager Console.

Install-Package PDFBucket

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:

using 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()
	.SetApiKey("ABCDEFGHIJKLMNO")
	.SetApiSecret("1234567890ABCDE")
	.SetApiHost("api.example.com")
	.Build();

And you get the encryptedUrl using the GenerateUrl method:

var EncryptedUrl = pdfBucket.GenerateUrl("http://example.com", "portrait", "A4", "0", "1");

Also you can pass the plain URL to PDFBucket:

var PlainUrl = pdfBucket.GeneratePlainUrl("http://example.com", "portrait", "A4", "0", "1");

Releases

No releases published

Packages

No packages published

Languages