Pretty Printing a Web Page

Gerhard Häring gh at ghaering.de
Thu May 29 12:35:40 EDT 2003


Roger wrote:
> I have a very old crotchety user who can't understand why she can't 
> print a perfectly formatted version of a web page my application 
> creates. My defense is that my printed phone bill from AT&T (a 
> multi-billion dollar, multi-national company with more resources) looks 
> just as bad...but it doesn't seem to be working.
> 
> The page in question is a tabular report with typical headings and 
> columns of numbers. A complicating factor is many of the column numbers 
> are links to other web pages.
> 
> Perfectly formatted on paper, it should be a multipage report with 
> headings repeated on subsequent pages and not contain any of the 
> browser-generated page numbers, URLs, underlined links, etc. Even worse, 
>  it must be of a quality suitable for distribution to a group of equally 
> old crotchety professionals. Worse still, the some of the group may 
> become users and want to print perfectly formatted pages as well.
> 
> The best idea I can come up with is creating and downloading a csv file 
> which could be loaded into a spreadsheet program, and then formatted and 
> printed. This will probably be unacceptable.
> 
> Can anyone offer a better solution (or at least empathy)?

I remembered CSS can address different media types (screen, print, 
screenreader, text-to-speech, ...). So I tried to

%google css print

which yielded me this:

http://www.evolt.org/article/Kissing_Print_Versions_of_Pages_Goodbye/20/22225/

from which was linked this:

http://www.w3.org/TR/REC-CSS2/page.html

It might be a start. I'll probably have to address printing of HTML soon 
myself and hope that CSS will help me there. As always with CSS, its 
"interesting" to find out which features are supported by the popular 
browsers, and which aren't.

-- Gerhard





More information about the Python-list mailing list