asp.NET - 将HTML字符串保存为PDF

时间:2014-01-06 08:54:06

标签: html asp.net vb.net pdf

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

最简单的方法是什么?