my dog learned polymorphism
The moose likes Struts and the fly likes howto create a print function ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "howto create a print function ?" Watch "howto create a print function ?" New topic

howto create a print function ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 465
good day to all,

i would like to have a function where i click on a button and it will printout the page that currently display and it fit to A4 size, the questions is howto i make the whole page fit to A4 size? also would it be good if i generate a pdf file first then only print ? pdf file allow to capture picture as well ?

can someone suggest some ideas for my scenario ? any sample i can reference on this ?

thank you very much for guidance
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'd suggest using a CSS print stylesheet. Just Google "css print" and you'll get a lot of links explaining how this works.

Consultant, Sima Solutions
I agree. Here's the link:
subject: howto create a print function ?
It's not a secret anymore!