how to convert html file into pdf file.
can any help me to get this plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
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.
Hudson LanePosted Jun 16, 2014, 2:24 AM
http://www.aspose.com/docs/display/pdfnet/HTML%20to%20PDF%20conversion
Munesh SharmaPosted May 2, 2014, 5:21 AM
http://www.c-sharpcorner.com/UploadFile/9f0ae2/convert-aspx-page-into-pdf-in-Asp-Net/
Nicholas BarnsPosted May 2, 2014, 4:57 AM
So first you can use HttpServerUtility.Execute method and capture a string output from the executed handler. After retrieving a HTML formatted string of your invoice page you can create a PDF file in C# from it. For testing purposes the above code will export a PDF file in ASP.NET to the client's browser, but what you can do is save it to a stream and then use that stream when adding an attachment to an email.
Also in case I misunderstood you and you are actually looking to create a PDF while inside a invoice.aspx then just replace the code for retrieving a HTML formatted string with a following:
Steve HandersonPosted Feb 13, 2014, 4:13 AM
rebecca yangPosted Sep 13, 2013, 4:14 AM
Ring ZhongPosted Sep 10, 2013, 11:23 PM
using Spire.Pdf;
namespace htmltopdf
{
class Program
{
[STAThread]
static void Main(string[] args)
{
//Create a pdf document.
PdfDocument doc = new PdfDocument();
String url = "http://www.london2012.com/news/articles/paralympic-torch-relay-route-revealed-1258473.html";
doc.LoadFromHTML(url, false, true, true);
//Save pdf file.
doc.SaveToFile("sample.pdf");
doc.Close();
//Launching the Pdf file.
System.Diagnostics.Process.Start("sample.pdf");
}
}
}
you should use the third-party dll to finish converting html to pdf file in high quality.
Rosi Sreenivasa ReddyPosted Aug 31, 2013, 5:47 AM
Sanjeeb LenkaPosted Aug 30, 2013, 5:35 AM
you can follow this link:
for this you need thirdparty dll
http://www.aspsnippets.com/Articles/Export-ASPNet-Web-Page-with-images-to-PDF-using-ITextsharp.aspx
Rosi Sreenivasa ReddyPosted Aug 30, 2013, 5:06 AM
so i am looking how to convert my aspx page...to pdf by URL......which contains gridview and inline styles applied on the page could you plz help ...?
for ex:
i have 2 page default.aspx
invoice.aspx
when i click button in default.aspx to generate pdf....by passing the url of invoice.aspx
just like passing
generateinvoice("localhost:1234//invoice.aspx");
i should get my invoice.aspx page tp invoice.pdf with the styles applied..on the pdf page ..
how to achieve this using any opensource dll.....could you plz elaborate.... as am new beee here...so that i can understnd
plzzzzzzzzz can any one see this problem and send some answer i got strucked urgent..................................
Rosi Sreenivasa ReddyPosted Aug 30, 2013, 3:43 AM
so i am looking how to convert my aspx page...to pdf by URL......which contains gridview and inline styles applied on the page could you plz help ...?
for ex:
i have 2 page default.aspx
invoice.aspx
when i click button in default.aspx to generate pdf....by passing the url of invoice.aspx
just like passing
generateinvoice("localhost:1234//invoice.aspx");
i should get my invoice.aspx page tp invoice.pdf with the styles applied..on the pdf page ..
how to achieve this using any opensource dll.....could you plz elaborate.... as am new beee here...so that i can understnd
Satyapriya NayakPosted Aug 30, 2013, 3:18 AM
Sanjeeb LenkaPosted Aug 30, 2013, 3:08 AM
refer to this link
http://aspsnippets.com/Articles/Export-HTML-DIV-contents-to-PDF-using-iTextSharp-in-ASPNet.aspx