【问题标题】:Supergo ABCPdf8 Error: Html Render is blank?Supergo ABCPdf8 错误:Html 渲染为空白?
【发布时间】:2013-08-21 08:18:26
【问题描述】:

Heloo,

我在使用 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

相同的代码在本地机器和不同的环境上都可以正常工作,但当我在某些机器上实时部署它时也无法正常工作。我已经尝试了所有与权限相关的修复,但在我的情况下不起作用。

任何人都可以帮助我吗??

【问题讨论】:

    标签: html asp.net vb.net abcpdf


    【解决方案1】:

    我也遇到了同样的问题,对我来说它可以添加下一行:

    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()
    
    [...]
    

    【讨论】:

    • 忘了说,您的 pdf 的外观可能会略有变化,但这取决于您是喜欢 pdf 的不同外观还是根本不让它工作!
    • ABCPDF V6有这个选项吗?
    【解决方案2】:

    这很可能是因为您使用的旧版本 ABCpdf 与这些新机器上的环境不兼容。

    升级到当前版本应该是您的第一站。

    有关不同版本支持的系统和功能的详细信息,请参阅:

    http://www.websupergoo.com/abcpdf-8.htm

    【讨论】:

      【解决方案3】:

      我遇到了同样的问题,在某些网站上它可以工作,而在某些网站上却没有。这些网站在同一台服务器上!

      我这样修复它: - 打开 IIS 管理器 - 转到“应用程序池” - 单击相关应用程序的名称 - 打开“高级设置” - 将“加载用户配置文件”设置为 False - 重启池和网站

      经过一个多小时的搜索,我做到了。

      【讨论】:

        猜你喜欢
        • 2022-08-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-12-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多