PDA

View Full Version : Set the page size


Coral_Lover
10-10-2002, 09:04 AM
Hi, Is there any methods in Javscript that can allow u to adjust what u r going to print in A4 size? [Your details is in a window]
Or, does anybody know how to solve this problem? Coz i've this table which fits well in the window, but when i print it in a A4 size paper, the table was not fully printed. Only 75% of the table was printed.... Hmm... or is there any JavaScript method which allows me to change the page property to LANDSCAPE??

glenngv
10-10-2002, 09:40 AM
javascript can't modify Page Setup properties of the user's machine. you have to adjust your table to fit the A4 size. and you have to have instruction to tell the user to print in Landscape orientation.

Coral_Lover
10-10-2002, 09:58 AM
Oic... ok... guess this is the only way out... :(
Hmm... how abt is there any methods in JSP which can set the page property to landscape??

glenngv
10-10-2002, 10:29 AM
you can't do it on server-side much more. it has no access on the client machine's settings.

Roy Sinclair
10-10-2002, 03:24 PM
There is a way you can specify landscape but unless the later Mozilla browsers support it now (they didn't the last time I checked) there is no browser support yet.

Stylesheets have the ability to have different styles for different media (http://www.w3.org/TR/CSS2/media.html) and for the print media style sheets allow you to specify that one page prints in portrait while the next page prints in landscape. (http://www.w3.org/TR/CSS2/page.html#page-size-prop). Unfortunately, browser support is what's lacking.