Export from HTML to PDF (C#)

Posted by Sem Dendoncker on Stack Overflow See other posts from Stack Overflow or by Sem Dendoncker
Published on 2009-02-26T09:44:34Z Indexed on 2010/06/16 18:52 UTC
Read the original article Hit count: 483

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET