Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to download div content into pdf or word document
Posted
Comments
Duchatived 8-Sep-15 3:57am    
Sheriff you may want to check out this C# library for word documents as well. Here is how I use it to create a PDF file with C#:

string html = "<div>...</div>";
DocumentModel document = new DocumentModel();
document.Content.LoadText(html, LoadOptions.HtmlDefault);
document.Save("out.pdf", SaveOptions.PdfDefault);

Also there is another way how you can convert your HTML into a PDF in C#.
I hope this helps.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900