views:

38

answers:

1

Hi again,

Does anyone know of a best practice print document for printing a website in IE6? I have a specific page that needs to be printed and it comes out well in other browsers except IE6 where it is being chopped off by a huge amount on the right side of my page.

Thanks

A: 

I have found the most fool-proof method of making something printable is by providing a print button that links to a PDF version of the document.

Generating the PDF is the major task there but that can be quite simple with the right tool.

I use http://www.xhtml2pdf.com/ which is a Python app to take a page and generate a PDF version. It might need some tweaking so you might need a special stylesheet to fix some things.

Other than that, you're left fixing IE. It might help to add a print stylesheet:

<link rel="stylesheet" href="print.css" type="text/css" media="print"  />

And overriding some of your more extravagant positioning methods. If you're centring, pull it back to the left, cut out extraneous margins and padding (remember background-images won't render with standard print settings so you can cut out a lot of padding).

You might find there's some crossover (ie you use some of the print styles in your PDF version) so you might be able to generate a hybrid solution to allow people to grab PDF versions and print straight from HTML.

Oli
Thanks Oli, I actually managed to get around it in the end. We had to print tabular data which was ok to fix with a table width change in the end. I will keep your PDF suggestion in mind for the future!
Sixfoot Studio