PHP Classes

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

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 44%Total: 1,470 All time: 2,659 This week: 206Up
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
Picture of Laurens Ramandt
Name: Laurens Ramandt <contact>
Classes: 2 packages by
Country: Belgium Belgium
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (3)  
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.

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,470
This week:0
All time:2,659
This week:206Up
 User Ratings  
 
 All time
Utility:66%StarStarStarStar
Consistency:58%StarStarStar
Documentation:-
Examples:58%StarStarStar
Tests:-
Videos:-
Overall:44%StarStarStar
Rank:3446