2017 © Pedro Peláez
 

library pdf-watermarker

Watermark or stamp PDF documents

image

binarystash/pdf-watermarker

Watermark or stamp PDF documents

  • Tuesday, August 9, 2016
  • by mul14
  • Repository
  • 2 Watchers
  • 0 Stars
  • 9,391 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 43 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

Build Status, (*1)

PDF Watermarker

PDFWatermarker enables you to add an image as a watermark to existing PDF files. It uses FPDF that allows you to write PDF files and FPDI that allows you to import existing PDF documents into FPDF., (*2)

Using it, you can:, (*3)

  • Use jpg and png ( with alpha channels ) files with a 96 DPI resolution
  • Easily position the watermark on the pages of the PDF file

Installation

  1. Place composer.phar in the folder you extracted the files to., (*4)

  2. Run php composer.phar install, (*5)

  3. Include the files in your project., (*6)

``` php <?php require_once('pdfwatermarker/pdfwatermarker.php'); require_once('pdfwatermarker/pdfwatermark.php');, (*7)


## Usage ``` php setPosition('bottomleft'); //Place watermark behind original PDF content. Default behavior places it over the content. $watermark->setAsBackground(); //Specify the path to the existing pdf, the path to the new pdf file, and the watermark object $watermarker = new PDFWatermarker('C:\test.pdf','C:\output.pdf',$watermark); //Set page range. Use 1-based index. $watermarker->setPageRange(1,5); //Save the new PDF to its specified location $watermarker->savePdf(); ?>

Five positions can be used. 'center' is the default., (*8)

  • center
  • topleft
  • topright
  • bottomright
  • bottomleft

See the API Documentation for more details., (*9)

Support

Report bugs at https://github.com/binarystash/pdf-watermarker/issues., (*10)

The Versions

09/08 2016

dev-master

9999999-dev

Watermark or stamp PDF documents

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar binarystash

27/04 2014

1.1.0

1.1.0.0

  Sources   Download

The Development Requires