Menu

#11 Printer-friendly stylesheet

open
nobody
None
3
2007-03-20
2007-03-20
No

The request is twofold:

A) Add a functionality "Print this page".

Basically, this "button" would to the following:

1. Open the currently viewed web document into a hidden browser

2. Looks for a "printer-friendly.css" stylesheet following the same rules as defined in feature request "Default stylesheets" (read it)

3. Call the print method over this hidden browser

The point of looking for a printer-friendly stylesheet is to possibly hide page headers, images or other things to make them display better on paper than on screen. In clear, adapt the presentation to paper medium so that you document can be printed.

B) Add a functionality "Print this log".

This "button" would to the following:

1. Make one big HTML document by

1a. stripping the head part of every document in the browser list

1b. replace each <body> part by a <div id="name-of-the-document"

1c. appending these divs in sequence in the same order as they appear in the document browser list

2. Call the "print this page" function on this generated document

You can even force a (printed) page break by adding style="page-break-after:always" in each div created in 1b.

This way, the same electronic log can be used on-the-fly as a printable document.

Discussion


Log in to post a comment.