Hi Schultz,
The exact method used for printing of dynamic pages depends upon how
the pages are served.
Active Server Pages may be print formatted through the use of a header
and footer which detects the presence of desired print formatting
variable and serves the page in printer friendly format. Steven Smith,
of the ASP Alliance, explains this technique in the article: "Creating
a Print View for your Web Pages", ASP Alliance.com:
http://www.aspalliance.com/stevesmith/articles/printview.asp
Pages created with PHP, using MySQL or other databases, or UNIX
Server-Side Includes can most often utilize a CGI (Common Gateway
Interface) script to automatically format the page into
printer-freindly content. A printer-friendly link is included on the
dynamic page template. Clicking on the link calls the CGI script, and
the printer-friendly page is created and displayed on the fly.
Printer-friendly scripts DO require that you add beginning and ending
tags to your basic content, so that they know which portions of the
page to display for printing, and which to leave out, including your
column headers if that is desired. This can usually be accomodated in
the database page display template.
I've used both of the following CGI scripts for dynamic page printing,
and found both of them to be satisfactory. Both script sources offer
excellent customer service and professional installation assistance,
if needed.
Master PFP - a free script from Willmaster.com.
"Master PFP is an easy to install, easy to maintain CGI program
written with Perl 5 to provide your visitors with a printer friendly
version of your web page. ("PFP" stands for "Printer Friendly Page")
You place "begin" and "end" tags into your web page. The program uses
these to determine what to display on the page it generates for
printing. This method allows you to be selective about what the user
will print.
You can choose to display your images, replace your images with text
(such as "[image]"), or have the program hide your images.
Optionally, you display the source URL, as a clickable link, at the
top and/or bottom of the printer friendly page."
Willmaster.com, Master PFP, http://willmaster.com/master/pfp/
Advance Print - $29.95 from PerlOnline.com
"Offer a printer friendly page to your visitors. When your visitor
clicks on the printer icon, they will be presented with a page with no
navigation links, images or other items that the user does not require
to print.
Features
--Instantly create Printer Friendly pages
--No Complex scripting to be setup, just add a link to the script on
the page and it becomes printer friendly.
--Add your own header, footer and copyright messages to the page.
--Option to remove or keep pictures."
PerlOnline.com, Advance Print
http://www.perlonline.com/advprint/index.htm
Additional searching found two more sources for similar CGI scripts:
http://www.webmutant.com/autoprint.shtml
http://www.icthus.net/CGI-City/scripts-printer-friendly.shtml
Additional resources for writing CGI scripts of your own, or
installing scripts created by others may be found at:
http://cgi.resourceindex.com/Documentation/CGI_Tutorials/
http://directory.google.com/Top/Computers/Programming/Internet/CGI/Tutorials/
I'm guessing by the technical level of your question that you are
using one of the database methods outlined above. As an even more
universal solution however, you might investigate Apache's XML
Project's FOP (Formatting Objects Processor) which uses Java to read
source objects and then format output display.
http://xml.apache.org/fop/index.html
Search terms used:
CGI Printer-friendly
://www.google.com/search?num=30&hl=en&client=googlet&q=CGI+printer-friendly+scripts
PHP Printer-friendly
://www.google.com/search?num=30&hl=en&client=googlet&q=PHP+printer+friendly+script
ASP printer-friendly
Hope this is useful to you.
larre-ga |
Clarification of Answer by
larre-ga
on
16 May 2002 10:53 PDT
ColdFusion will accept standard HTML tags and pass them through the
server unchanged, however, you can also use a built-in capability of
Cold Fusion to create a new "printer-friendly" link, using the
CFOutput tag to generate a page with the query data formatted
specifically for printing.
CFML would be:
<CFOUTPUT QUERY="queryname" MAXROWS=n >
Literal text, HTML tags, and
dynamic field references (e.g., #FullName#)
</CFOUTPUT>
Here are directions from Allaire's own Cold Fusion website which
should clarify the exact procedure to use in order to add a separate
output link to a "subset" of the query data:
http://www.houseoffusion.com/cfdocs1/Developing_Web_Applications_with_ColdFusion/12_Selecting_and_Presenting_Data/dwa12_06.htm
Here's a link to Cold Fusion users groups, forums, developer
information and publications.
http://www.cfug-md.org/cflinks.cfm
ColdFusion Custom Tags offers ready-to-use code for specific purposes.
I located one of their offerings: Print Block with Page Breaks, (cost
$5.00) that seems to be very close to what you're looking for.
Best of luck.
larre-ga
|