views:

61

answers:

4

We're currently generating reports for our web application using html5 / css3, and they look good on screen, but obviously when the user hits print who knows what is going to come out of the printer. So, what I would like to know is what is the best way to convert these reports to PDF for download / printing while maintaining the same visual quality of the on screen reports.

Update 2010-10-26 16:01: We're using both .NET and Perl

A: 

If you are using some of the new HTML5 elements like Canvas, then probably even the popular PDF converter wont help you.

I suggest you to put suitable print-friendly version of your CSS. This could be achieved by using media="print" attribute in the <link rel="stylesheet"... tag of a separate CSS file, which is containing the definitions for print version.

Lucho
We've held off on using canvas for reports, essentially what we have is xhtml and css3
jjafuller
+1  A: 

Some options (all proprietary):

For open-source alternatives, please see here:

http://stackoverflow.com/questions/430590/open-source-html-to-pdf-renderer-with-full-css-support

rsenna
A: 

Try Prince XML, the results are pretty to look at.

foolip