Hello All,
I have question to convert a html document to pdf in asp.net using c#
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 15, 2014, 6:54 AM EST
Howard Mahaffey12 reputationPosted Aug 18, 2015, 11:49 PM EDT
// Create a new empty document. var document = new DocumentModel(); // Add HTML content. document.Content.LoadText(htmlText, LoadOptions.HtmlDefault); // Save the document as PDF file. document.Save("Document.pdf");// Load HTML document. var document = DocumentModel.Load(htmlPath); // Save the document as PDF file. document.Save("Document.pdf");Karthikeyan KRank #554 · 4.4K reputationPosted Aug 19, 2015, 1:49 AM EDT