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!

Printing Problem - Right Margin

Status
Not open for further replies.

theogary

Programmer
Mar 3, 2003
99
US
I have a online form I want the users to print but in IE it cuts off the right part of the form. In Mozilla it is fine. I set the margins of the form to zero but the print out is unpredictable. Is there any kind of print control(Java or ColdFusion). Please Help. I am getting complaints
 
theogary,
Others may have more sophisticated answers for you than I do. I will be happy to learn about alternatives if there are any, but here is my experience.

Correcting for content that won't fit is sometimes a matter of advising users that they might have to adjust the left and right print margins in their browser. You can't do this for them via code. In IE these margins will often default to 1.25 inches which is relatively large. Some printers behave differently too and your content width settings end up having to be set to the "worst" case scenario. I would try to reduce the width of the content on the page so that it is more likely to fit inside the default margins of the page when printed. Sometimes this will screw up the layout you had planned. You'll have to decide.

One page I had required limiting the content width to 665 pixels when printing. For the broswer display, the page was 700 pixels wide. Reducing the content width for the print process is a better solution than asking users to adjust their browser margins since the setting will apply to all pages they print and won't revert to a previous setting automatically. You can use CSS to define the print output differently than the browser display. The browser version can keep the width that looks good, but when the page is sent to a printer, different settings apply. Some CSS printing controls don't work in all browsers, but the most basic ones for font-size, font-weight, etc. do. Table widths will also work well across browsers. See if changing width of the content you send when printing fixes the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top