Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would I convert a HTML5 / CSS3 document to PDF?

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

like image 263
Jeffrey Fuller Avatar asked Oct 26 '10 19:10

Jeffrey Fuller


People also ask

Can a chrome HTML document be converted to PDF?

Browse to the desired web page: Click the More Options button —three vertical dots on the far-left of the browser's top ribbon. Click on the Print option. Change Destination to Save As PDF.


1 Answers

The only think I can think of that might work is wkHTMLtoPDF. It's a QT app that sits on top of WebKit to generate its PDF.

The good news is that it even evaluates JS so just about anything goes.

The other good news is that QT is available across a wide selection of platforms. Whatever you might be using, chances are you can use QT.

like image 72
Mark Storer Avatar answered Nov 09 '22 22:11

Mark Storer