查看: 1302|回复: 1

[问与答] asp 把网页转pdf

[复制链接]
大熊 发表于 2019-6-5 16:24:09 | 显示全部楼层 |阅读模式
  1. Set theDoc = Server.CreateObject("ABCpdf10.Doc")
  2. theDoc.Page = theDoc.AddPage()
  3. theURL = "http://www.baidu.com/" '要生成的PDF源内容的网址
  4. theDoc.AddImageUrl(theURL)
  5. theDoc.Save server.MapPath("html.pdf")
  6. response.Write "html.pdf"
复制代码



报错

Unable to render HTML. Failed to configure IE 9 or above for the MSHtml engine: Access denied while writing to the registry. For IIS applications, please enable "Load User Profile" or consult MSHtmlBootstrap in the documentation. Alternatively, you can configure this registry setting manually: 1. Create registry key "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI" (which have to be under the Wow6432Node key if the running process is 32-bit on an x64 system; the current process is 32-bit). 2. In the created key, create a DWORD value named "w3wp.exe". 3. Set the DWORD's value to 1.
文字生成pdf没出错,正常生成
应该是权限问题。大家有什么解决办法没 或生成pdf的方法
xuanxiao 发表于 2023-5-28 18:04:06 | 显示全部楼层
asp导出pdf实例【2022.09.15更新版】
http://bbs.ttasp.com/thread-8636-1-1.html
(出处: 天天ASP家园)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号