问题描述
Response.ContentType = "application/pdf"
response.addheader("content-disposition","attachment;filename=Panel.pdf")
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Dim sw As New StringWriter()
Dim hw As New HtmlTextWriter(sw)
pnlchecklist.RenderControl(hw)
Dim sr As New StringReader(sw.ToString())
Dim pdfDoc As New Document(PageSize.A4,25.0F,25.0)
Dim htmlparser As New HTMLWorker(pdfDoc)
PdfWriter.GetInstance(pdfDoc,Response.OutputStream)
pdfDoc.open()
htmlparser.Parse(sr)
pdfDoc.Close()
Response.Write(pdfDoc)
Response.End()
您好,pnlchecklist 是我的 asp.net 面板,其中包含一个 HTML 表格和 asp.net Gridview。我可以将它们导出为 pdf,但我想更改 pdf 的字体系列、字体大小和填充。
我做了很多研究,但仍然找不到正确的方法。
请帮忙。非常感谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)