PHPBuilder - Creating a Printer Version Grab Method



RSS Twitter
Articles Html

Creating a Printer Version Grab Method

by: Jim Fletcher
|
April 1, 2004

Background

Many methods exist to creating printer versions. A few of these include:
  • creating a separate HTML page for every page on your website that is formatted to print well.
  • using a database to hold the page content and display the content via either the normal template or the stripped-down printer template.
  • including a header.php file above your content and footer.php below your content.
The method I will describe here is different from the usual methods and is used on websites like CNN.
The basic idea is to put a hidden html comment tag at the beginning of the main content of your webpage, and another hidden html comment tag at the end of your content.
<!--startclickprintinclude-->
The content you want to print goes here.
<!--endclickprintinclude-->
The Printer Version script will open the webpage, grab only that which is between the hidden tags, and display it within the Printer Version template.

1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Jim Fletcher

Comment:



Comment:

(Maximum characters: 1200). You have characters left.