PHP Classes

Print Anything: Make a browser print a given HTML document

Recommend this page to a friend!

  Author Author  
Name: Vagharshak Tozalakyan <contact>
Classes: 22 packages by
Country: Armenia Armenia
Age: 37
All time rank: 61 in Armenia Armenia
Week rank: 50 Down1 in Armenia Armenia Equal
Innovation award
Innovation award
Nominee: 7x

  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to make a browser print a given HTML document.

It generates HTML with special Javascript code and CSS style sheet that includes the whole page in a non-printable section and adds a new page section with given HTML that you want to print, but it is not displayed in the browser.

The class can also generate links of form buttons that when clicked trigger the execution of the generated Javascript code making the browser printing dialog open to print the HTML document section that it is intended to be printed.

Each page may have multiple print links or form buttons to print distinct HTML documents.

  Classes of Vagharshak Tozalakyan  >  Print Anything  >  Download Download .zip .tar.gz  >  Support forum Support forum (4)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Print Anything
Base name: print_anything
Description: Make a browser print a given HTML document
Version: 0.1.1
PHP version: 4
License: MIT/X Consortium License
All time users: 4505 users
All time rank: 604
Week users: 4 users
Week rank: 244 Up
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image HTML HTML generation and processing View top rated classes
Group folder image Printing Document generation and preparation for printing View top rated classes

  Innovation Award  
PHP Programming Innovation award nominee
March 2008
Number 8

Often users want to print contents of Web pages. A page can easily be printed using a button attached with some Javascript code. However, usually not everything displayed on a Web page is intended to be sent to the printer.

This class implements a clever solution that makes use of Javascript and CSS to send to the printer only the relevant parts of the page content.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (93%) Good (93%) Sufficient (68%) Good (87%) - - Sufficient (71%) 243
Month: Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Plain text file class.PrintAnything.php Class Class Source
Accessible without login Plain text file example.php Example Sample
Accessible without login Plain text file howto.txt Doc. Help
Accessible without login Plain text file test.php Aux. Example of external output (used by example.php)

Install with Composer Install with Composer - Download Download all files: print_anything.tar.gz
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.