Xaqron
Xaqron

Reputation: 30857

Create simple PDF document on the fly with C#, which library to use?

I want to convert a simple HTML table into PDF in the memory (not file system) like this:

string pdfContent = "<table>...</table>";
byte[] pdf = WantedComponent.CreatePDF(pdfContent);

My HTML table has simple text without any formatting.

Upvotes: 0

Views: 1386

Answers (1)

rsbarro
rsbarro

Reputation: 27339

You can try iTextSharp. It can render simple HTML as a PDF. I've tried using it but ran into some issues with tables with colspans, but if your HTML table is very simple it might work for you.

http://sourceforge.net/projects/itextsharp/

Also, see the answer to this question for some sample code on how to convert HTML to PDF.

Upvotes: 2

Related Questions