Export from HTML to PDF (C#)
- by Sem Dendoncker
Hi,
In our applications we make html documents as reports and exports.
But now our customer wants a button that saves that document on their pc. The problem is that the document includes images.
You can create a word document with the following code:
private void WriteWordDoc(string docName)
{
Response.Buffer = true;
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.doc", docName.Replace(" ", "_")));
Response.Charset = "utf-8";
}
But the problem is that the images are just links an thus not embedded in the word document.
Therefore I'm looking for an alternative
PDF seems to be a good alternative, does anyone know a good pdf writer for C#?
One that has some good references and has been tested properly?
Best regards,
Sem