File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 437
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
It is sorta covered in the JavaRanch Style Guide.
subject: howto create a print function ?
Similar Threads
howto apply design pattern ?
howto fix the size of table ?
HowTo do this ?
howto initial select in option ?