Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Pages to Print using CSS 1

Status
Not open for further replies.

Coxy92116

Programmer
Nov 3, 2004
3
GB
Hi,

I have an html page with a vast amount of data. Part of this data is a very wide table. Currently, when i print preview the web page the RHS of the table is truncated to fit onto an A4 (or whatever page size the user has specified). I do not want to wrap the table onto the next row but would still like all the information to be printed on request.

Example;

"
<data>
<data>
<data>

<................Table................> // landscape????

<data>
<data>
" ^
/ \
|
|
A4 page truncates at this point.


1. I could set the print preview settings to print all data visible on the web page. However, i am unable to find a way of doing this. Are there any other methods?

2. Additionally i would like to set the page(s) for the table to be landscape. I am able to put a page break in using the CSS style page-break-before and page-break-after but unable to set the 'size' attribute to landscape due to it not being supported yet in current versions of IE (i think!). Is there any other way of doing this?

Hope someone can help as this has been bugging me for a while now!

Thanks,


 
You can't set the printer settings of a user's browser programmatically (unless you consider ActiveX controls - messy in my point of view). These settings need to be chosen by each individual user.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Hi Flava,

cheers for your comments.

I've managed to do this another way using the css 'writing-mode' element to create a verticle table and print the table this way. The standard horizontal view can be used for on-screen viewing and a vertical table (with 90 degree rotated text) for printing.

I believe there are some plans within css to account for printing options in the future it is just that the present browsers do not appear to support them.

Cheers



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top