2017 © Pedro Peláez
 

library php-pdftk-toolkit

A simple PHP PDFTK wrapper.

image

bensquire/php-pdftk-toolkit

A simple PHP PDFTK wrapper.

  • Saturday, March 5, 2016
  • by thfava
  • Repository
  • 6 Watchers
  • 25 Stars
  • 1,764 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 2 Open issues
  • 3 Versions
  • 18 % Grown

The README.md

php-pdftk-toolkit

A PHP library to that creates an interface for the PDFTK (PDF-Toolkit) command line interface (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/)., (*1)

A simple PSR-0 compliant library, this project will build and run the typical command line parameters used to merge and modify PDFs., (*2)

Note: If your looking for the simpler non PSR-0 compliant module, then you can download the tagged 'v1' commit., (*3)

Example Code:

//Initiate autoloader

use Pdftk\Pdftk;

$oPdftk = new Pdftk();
$oPdftk ->setInputFile(array("filename" => $path . 'example.pdf', 'start_page' => 2))
        ->setInputFile(array("filename" => $path . 'example2.pdf', 'rotation' => 90))
        ->setInputFile(array("filename" => $path . 'example2.pdf', 'password' => 'password', 'alternate' => 'odd'))
        ->setUserPassword("userpassword")
        ->setOwnerPassword("ownerpassword")
        ->setEncryptionLevel(40)
        ->setOutputFile('/tmp/generated.pdf');

$oPdftk->_renderPdf();

Implemented Functionality:

  • Page Rotation
  • Adjustable encryption level
  • Open Password Encrypted PDFs
  • Create Password Encrypted PDFs
  • Use implicit pages or a range
  • Use alternate pages (odd or even)
  • Rotate pages
  • Output the PDF to the browser or a file

Installation:

  • Download and install the PDFTK binary http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
  • Download this PHP library
  • Update the location of the PDFTK binary within this library
  • Try the examples!
  • Provide Feedback :)

Requirements:

This library requires no additional software beyond a functional version of PHP 5.3 (or greater) and version 1.45 of the pdftk binary (remember to update the binary location if its not in /usr/local/bin)., (*4)

The Versions

05/03 2016

dev-master

9999999-dev https://github.com/bensquire/php-pdftk-toolkit

A simple PHP PDFTK wrapper.

  Sources   Download

MIT

The Requires

  • ext-hash *
  • php >=5.6.0

 

The Development Requires

php pdf pdftk

23/05 2014

1.2

1.2.0.0 https://github.com/bensquire/php-pdftk-toolkit

A simple PHP PDFTK wrapper.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-hash *

 

The Development Requires

php pdf pdftk

23/05 2014

dev-development

dev-development https://github.com/bensquire/php-pdftk-toolkit

A simple PHP PDFTK wrapper.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-hash *

 

The Development Requires

php pdf pdftk