0

当我打印到页面时,我得到一个空白的 PDF 页面。

这是我的代码的一部分

    Dim theURL, theID
    Dim i
    Dim strSubject, strBody
    Dim strAttach
Dim thedoc As New Doc
theDoc.HtmlOptions.Engine=EngineType.Gecko

    'Set minimum number of items a page of HTML should contain. 
    ' Otherwise the page will be assumed to be invalid.
    thedoc.HtmlOptions.ContentCount = 20
    ' Try to obtain html page 10 times
    thedoc.HtmlOptions.RetryCount = 10
    ' The page must be obtained in less then 20 seconds
    thedoc.HtmlOptions.Timeout = 20000
    'On Error Resume Next
    thedoc.Rect.Inset(1, 1)
    thedoc.Page = thedoc.AddPage()
    theURL = _URL & "&xxx=" & now()
    theID = thedoc.AddImageUrl(theURL)
    ........
    ........
    ........
    ........
    Dim theData
    theData = thedoc.GetData()
    Response.ContentType = "application/pdf"
    Response.AddHeader("content-length", theData.Length.ToString())
    Response.AddHeader("content-disposition", "inline; filename=print.pdf")
    Response.BinaryWrite(theData)
    thedoc.Clear()
    thedoc = Nothing

请帮忙。我无法解决问题。已经搜索了谷歌并用完了想法。我需要安装最新版本的 Adob​​e acrobat 吗?

4

2 回答 2

0

WebSupergoo 的支持页面上有此问题的故障排除指南:

6.7 - 当我转换 HTML 时,我得到一个空的 PDF...

呈现 URL 的空白输出可能有很多原因。遇到安全问题并不少见,但也可能是由于网络问题、防火墙、DNS、缓存等。所以不可能简单地猜测可能出了什么问题。您会发现解决此问题或缩小问题范围的最快方法是使用疑难解答程序。

ABCpdf 实际上并没有使用 Acrobat,因此升级 Acrobat 不太可能解决此问题。

于 2011-05-29T15:39:41.660 回答
0

您使用的是什么版本的 ABCPDF?IE9 破坏了 ABCPDF 7 及以下版本。所以要么卸载 IE9 要么升级到 ABCPDF 8。

希望这可以帮助。

于 2012-06-07T16:05:49.317 回答