- Set theDoc = Server.CreateObject("ABCpdf10.Doc")
- theDoc.Page = theDoc.AddPage()
- theURL = "http://www.baidu.com/" '要生成的PDF源内容的网址
- theDoc.AddImageUrl(theURL)
- theDoc.Save server.MapPath("html.pdf")
- 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的方法 |