[Ilugc] Printing from web applications

  • From: rajanvn@xxxxxxxxx (Natarajan V)
  • Date: Sun May 27 08:40:49 2007

On 5/26/07, sbl <sbl@xxxxxxxxxxxxxxxxxxxxx> wrote:



Anoop John wrote:
Let me give you a simple example - printing on small format printers
or on continuous sheet printing - managing the width and height is
very difficult from a web application.

I am not sure if the following will help you, but give it a try.

What we used to do when we have to print a form through the browser,
is as follows.
1. Use different CSS for print and for screen using MEDIA:PRINT and
MEDIA:SCREEN tags in the Style sheet. This way, we can print what is
not displayed on screen and show what is not printed. We can also
force a page break or a repeat header (repeat one part of the screen
in every page) using the stylesheets.

2. Proivide the user with a button which does a document.print (in
JS). The user can optionally print from file->print.

Cheers,
Natarajan

Other related posts: