This is not possible now, but nothing is stopping you from starting an open source project that will do it. I could start it because I need it too!
Basically, you'll need a parser that converts html and css markup to iTextSharp classes. So <table> becames iTextSharp.SimpleTable etc.
It would be easy to create a prototype that could work with a limited subset of html and css.
Update: As long as this is possible, I temporarily allowed this for myself. Only two steps:
- Tell your users to download an open source application called PDFCreator
Make all your friendly html reports printable by providing print stylesheets. A.
If some of your multi-page reports have headers on each page, set them in the THEAD html tag.
Now users can print, and if they choose the PDFCreator printer driver, they can even receive a report in PDF format (there are other PDF file drivers, but this is free and open source).
I also know that HTML is not as flexible as PDF, but it can be good enough. I did some tests with real users, and they really like it, because not only can they print anything in PDF format now (even outside my application), but their workflow is faster because they donโt have to download and wait until their PDF reader opens up. they just print (or export to pdf) what they see on the website, directly from their web browser ... something makes sense.
lubos hasko Jan 10 '09 at 4:21 2009-01-10 04:21
source share