File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes need some help printing please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "need some help printing please" Watch "need some help printing please" New topic

need some help printing please

verduka fox
Ranch Hand

Joined: Jan 18, 2001
Posts: 178
I am creating an intranet site which multiple users will be accessing. All of the users have different purposes in the system, so each screen is important to someone. Due to this, all screens will need to be printed. I have a print button which the user will press if he wants the current page printed. This page will then open a new browser and display a print-friendly page. This seems to work ok, but the owners of this project have some requests for the printed version:
1) On certain pages, the orientation of the printed page needs to be landscape instead of portrait. How do I manipulate the orientation for the printing of this page, and then return it to portrait when I am finished?
2) How do I force a page break? I will be printing a report of several test results and each test needs to be on its own page. My manager mentioned something about control+L or a hex code in html that will create a page break in the html. I am not familiar with this; has anyone heard of this or know of a different solution?
3) When the page is printed, there is header and footer info on the page. The header contains the page's title and page x of y info. The footer contain the url to the page and the date. The owners would like this removed so it looks more like a report than a page off the web. Is this possible? If so, how?
4) They have also requested that the margins be reduced to fit more on the page. How do I decrease the left and right margins to 1/2 inch?
I have doubts that any of these are possible since they would be altering the user's browser preferences. However, I need some confirmation. Please respond and let me know if any of the above are possible. By the way, we are recommending use of IE 5 or greater on a windows platform.
Thanks for your help!
verduka fox
Ranch Hand

Joined: Jan 18, 2001
Posts: 178
If anyone knows of a resource where I can find the answers or if you have the answers, I'd really appreciate your help. Thanks!
I agree. Here's the link:
subject: need some help printing please
It's not a secret anymore!