views:

232

answers:

3

I'm have a web page where I have a div within which there is a somewhat complex DOM tree. It displays fine across most browsers(IE 6-8, FF 2.x-3.5.x, Chrome, Safari) but when I try to print the page I'm having some cross-browser problems, some work half some of the time and others don't work at all.

I had the idea that if I could send offending the DOM nodes to the server, parse the DOM tree out into an image there and use that image to print in the browser, I'd solve this problem in one fell swoop.

Does anybody know of an easy way to do this?

I've got apache running mod_python and PHP and IIS 6 running .NET 2.0 so I could implement it on either one of those, really no preference on my part :)

Any ideas?

A: 

You could give Prince a try.

Gumbo
A: 

I have used this C# code as a basis for getting screenshots of web pages before, and it worked really well.

Web Page Thumbnailer

RedFilter
Led me to http://websitescreenshots.comWhich is exactly what I was looking for.Thanks
gzzzur
+1  A: 

That sounds like a pretty bad way to solve your problem. It would be better to try and fix the root cause.

troelskn
yes, while that is true, the root cause is in a 3rd party library that I really don't have the inclination nor resources to fix.
gzzzur