Graph-IT

pdfmixer.php

This script sets one pdf as background of another pdf using pdftk.

Usage:

 pdfmixer.php [options] <foreground-PDF> <background-PDF> <output-PDF>

Parameters:

Example:

pdfmixer.php -d -ow /var/nfs/oeffentlich/pdfmixer/company/deleteme.pdf /var/nfs/oeffentlich/background/watermark_company.pdf /var/nfs/oeffentlich/pdfmixed/finished/company_deleteme.pdf"

This would add the 'watermark_company.pdf' as background to 'deleteme.pdf'. Delete 'company_deleteme.pdf'. Save the merged output pdf as 'company_deleteme.pdf' and delete the foreground 'deleteme.pdf'.

Side note: We usually use this script through incron.d, which monitors different folders and which each correlate to a different background pdf.