0

I have data stored in the database with HTML format, and I want to get the value of this html content with MyReader.getString() after getting the html code I must do the conversion to PDF Format.

You have any idea on how can I do it ? !!

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Wassim AZIRAR
  • 10,823
  • 38
  • 121
  • 174

3 Answers3

1

Pdfcrowd has an online API that lets you convert HTML to PDF. They have, among others, a client library for .NET. The API is pretty easy to use.

0

Use a tool like webSuperGoo's ABCpdf, I've used it in the past and I found it quite easy to setup and use.

http://www.websupergoo.com/abcpdf-5.htm

Damien Dennehy
  • 3,937
  • 2
  • 19
  • 21
  • I don't need a `software solution`, I need to do it manualy with for example a library like the `iText` in `JAVA`. – Wassim AZIRAR Jun 21 '10 at 17:00
  • There isn't a built in library to do PDF conversion in .NET. I recommended ABCpdf because doesn't require an install of software on your web server - you just add the DLL to your project. – Damien Dennehy Jun 21 '10 at 17:14
-2

You can put the whole HTML content into Word (as a HTML document) and extract it as PDF.

Aykut Çevik
  • 2,060
  • 3
  • 20
  • 27
  • @Vincent: why? Save the entire HTML to a document. Add a Microsoft Word reference to your project and open your HTML document like this: Dim objWord As Word.Application Set objWord = New Word.Application objWord.Documents.Open ":\.html", , , True Now you can extract this document as a PDF document. (Explained here: http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/1bbecda8-d2fc-4578-983a-1de361367f19) – Aykut Çevik Jun 21 '10 at 19:38
  • @AykutÇevik this isn't truly a solution but rather a hack or a work around. I like the idea because it doesn't include any third party libraries; but it's doesn't fit the OP's question or tags as the OP is talking about ASP.net which Word is not _technically_ a part of. – Richard Barker Jul 09 '15 at 16:27