vb.net Supergo ABCPdf8 错误:Html 渲染为空白?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18352250/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Supergo ABCPdf8 Error: Html Render is blank?
提问by Sohail Hameed
Heloo ,
嘿嘿
I am stuck in this error while generating Pdf from HTML using ABCPdf8 my code is
我在使用 ABCPdf8 从 HTML 生成 Pdf 时遇到了这个错误,我的代码是
Dim PdfDocument As New WebSupergoo.ABCpdf8.Doc()
Dim PdfId As Integer
PdfDocument.Page = PdfDocument.AddPage()
PdfId = PdfDocument.AddImageHtml(HTML) // Crash over here
PdfDocument.Transform.Translate(0, -10)
While True
If Not PdfDocument.Chainable(PdfId) Then
Exit While
End If
PdfDocument.Page = PdfDocument.AddPage()
PdfId = PdfDocument.AddImageToChain(PdfId)
End While
For index As Integer = 0 To PdfDocument.PageCount Step 1
PdfDocument.PageNumber = index
PdfDocument.Flatten()
Next
If PdfDocument.PageCount > 1 Then
PdfDocument.PageNumber = 1
End If
Same code is working fine on local machine and also on different environment but not working when i deploy it on live as well on some machines also. i have tried all the permission related fixes but not working in my case.
相同的代码在本地机器和不同的环境中都可以正常工作,但是当我在某些机器上实时部署它时也无法正常工作。我已经尝试了所有与许可相关的修复,但在我的情况下不起作用。
Can any body help me in this ??
任何机构都可以帮助我吗?
回答by David Aleu
I've had the same issue and for me it worked adding the next line:
我遇到了同样的问题,对我来说,它添加了下一行:
Dim PdfDocument As New WebSupergoo.ABCpdf8.Doc()
Dim PdfId As Integer
PdfDocument.HtmlOptions.Engine=WebSupergoo.ABCpdf8.EngineType.Gecko //add this line
PdfDocument.Page = PdfDocument.AddPage()
[...]
回答by Pascal Rosseel
I had the same issue where on some websites it worked and on some it didn't. These websites were on the same server!
我遇到了同样的问题,在某些网站上它可以工作,而在某些网站上却没有。这些网站在同一台服务器上!
I fixed it like this: - Open IIS Manager - Goto 'Application Pools' - Click on the Name of the application in question - Open the 'Advanced Settings' - Set 'Load user profile' to False - Restart the pool and the website
我是这样修复的: - 打开 IIS 管理器 - 转到“应用程序池” - 单击相关应用程序的名称 - 打开“高级设置” - 将“加载用户配置文件”设置为 False - 重新启动池和网站
That did it for me, after more than an hour of searching.
经过一个多小时的搜索,我做到了。
回答by OnceUponATimeInTheWest
Most likely this is because the older version of ABCpdf which you are using is not compatible with the environment on these newer machines.
这很可能是因为您使用的旧版 ABCpdf 与这些较新机器上的环境不兼容。
Upgrading to the current release should be your first port of call.
升级到当前版本应该是您的第一个停靠点。
For details of supported systems and features for different versions see:
有关不同版本支持的系统和功能的详细信息,请参阅:

