tags:

views:

85

answers:

2
+1  Q: 

HTML to PDF in c#

Hello,

I'm trying to create an application that converts a file from the HTML format to the PDF format.

The approach I am using is:

  1. HTML to XHTML
  2. XHTML to Formatting Object
  3. Formatting Object to PDF

I'm having a bit of trouble with the whole XHTML to FO(or xsl).

Can you please tell me how to transform the XHTML to FO?

Or maybe a different approapch to the whole HTML to PDF?

Thanks, Catalin

+1  A: 

Well you could use a HTML to PDF converter via shell, I am sorry I can not rememeber the name of the one I have used in the past, if you have a Google around, you should be able to find a good one.

Wolfy87
Remembered what I used! http://code.google.com/p/wkhtmltopdf/
Wolfy87
Does it work on local *.html files?
Catalin Florea
Yes, it is a program. You use the shell command to run it from your C#
Wolfy87
+1  A: 

Searched a lot for my personal stack app project SO2PDF and finally settled with wkhtmltopdf which so far is the best free tool to convert HTML to PDF. Yes I used it with c# ;-)

Shoban