Hello,
can any one provide me code for convert html page to pdf file with images.
e.g
like when we generate on-line bank statement to pdf file.
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Howard MahaffeyPosted Aug 24, 2015, 5:36 AM
Alex HeigPosted Apr 10, 2013, 4:05 AM
It is very difficult to convert HTML to PDF witout any 3rd party tools. I recommend you to try Elerium HTML to PDF .NET component. It allows to convert html string/file/url to PDF including styles, but it is not free. I hope this example will help you:
http://eleriumsoft.com/PDF_NET/HTML2PDF/Examples/Right_converting_HTML_with_Images_to_PDF.aspx
Disclaimer: I work for Elerium Software.
Sautinsoft companyPosted Oct 8, 2012, 7:09 AM
Hi, try to use our PDF Vision .Net. The component transform Images and HTML to PDF. Also allows split and merge PDF files. It's a very simple in use and in add into your application.
You need to add just two lines of code in to your directory!
You can use:
Full version of PDF Vision .Net
Trial PDF Vision .Net version
Sample code i hope be usefull :)
Convert HTML to PDF in ASP.Net/C#:
SautinSoft.PdfVision v = new SautinSoft.PdfVision();
v.PageStyle.PageSize.Letter();
byte [] pdf = v.ConvertHtmlFileToPDFStream(@"http://www.microsoft.com");
if (pdf!= null)
{
Response.Buffer = true;
Response.Clear();
Response.ContentType = "application/PDF";
Response.AddHeader("Content-Disposition:", "attachment; filename=Result.pdf");
Response.BinaryWrite(pdf);
Response.Flush();
Response.End();
}
Others code samples you can find here
Satyapriya NayakPosted Oct 5, 2012, 8:13 AM