PHP Classes
elePHPant
Icontem

PDF print: Alter a PDF document to make it print when opened

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-11-16 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,459 All time: 2,613 This week: 842Up
Version License PHP version Categories
pdf-print 1.0.0Q Public License ...5.0PHP 5, Files and Folders
Description Author

This class can be used to alter a PDF document to make it print when opened.

It can open a given PDF file and regenerate it inserting special JavaScript code to make it open the print dialog when it is opened.

The altered PDF file may be saved to a given file or displayed as the current script output.

Innovation Award
PHP Programming Innovation award nominee
September 2010
Number 3


Prize: One downloadable copy of PhpED Professional
PDF is a format often used as a means to generate documents to be printed on paper of specific dimensions.

When a site serves a PDF document, the browser may open it but usually it is up to the user to tell explicitly the viewer program to print it.

This class provides a more user friendly solution for this problem by altering PDF documents in such way that they contain JavaScript code that makes the viewer program open the print dialog when the document is opened.

Manuel Lemos
Name: Laurens Ramandt <contact>
Classes: 2 packages by
Country: Belgium Belgium
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file class.pdffile.php Class Main class
Accessible without login Plain text file demo.class.pdffile.php Example Example use
Accessible without login Plain text file class.pdffile-loadContents.php Aux. Modified version of the script to allow direct input of PDF contents, instead of loading from a file.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,459
This week:0
All time:2,613
This week:842Up