Linux Systems Administrator
Jupitermedia
US-AZ-Tucson

Justtechjobs.com Post A Job | Post A Resume

Creating a Printer Version – Grab Method
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.
[ Next Page ]


Comments:
RE: Interesting, but too complex IMHOScott08/16/04 19:54
CSS is the apropriate solution!Fernando Wendt08/13/04 12:51
RE: using variablesmt07/29/04 03:32
Come on...too much work when you can use CSSBig Mac Attack07/10/04 19:05
using variableBIGmrC06/03/04 07:49
Printer version? CSS!Chris Erik Haugli04/16/04 02:40
RE: Interesting, but too complex IMHOJim Fletcher04/14/04 18:59
Interesting, but too complex IMHOTom04/09/04 09:45
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.