Dim HTMLstr as String
在此变量中,我正在编写纯 HTML代码,然后将其显示在 asp.net
中的标签中 HTMLstr = "<table width=""auto;""> "
HTMLstr &= "<tr style=""color:white ; background: #336699; font-style:bold;"">"
HTMLstr &= "<th width=""257px;"" height=""40"" >Service Name</th>"
HTMLstr &= "<th width=""100px;"" height=""40"">Hits </th>"
HTMLstr &= "<th width=""100px;"" height=""40"">Revenue</th>"
HTMLstr &= "<th width=""100px;"" height=""40"">Service Cost</th>"
HTMLstr &= "</tr></table>"
Label_Html.Text = HTMLStr
我想将整个HTML字符串导出为PDF
最简单的方法是什么?
答案 0 :(得分:1)
此链接显示其他人尝试执行类似操作。
http://forums.asp.net/t/1805488.aspx
OP提出的问题已通过这三个链接回答,因此您可能也想查看它们。
http://www.aspsnippets.com/Articles/Export-ASPNet-Web-Page-with-images-to-PDF-using-ITextsharp.aspx
Export table content to text format in pdf using iTextSharp.text
http://aspdotnetcodebook.blogspot.in/2008/07/how-to-export-content-of-gridview-to.html