开发者

ABCPDF.Net 8.0 not displaying the PDF

开发者 https://www.devze.com 2023-03-08 08:39 出处:网络
I am getting a blank PDF page when I print to the page. Here is the part of my code Dim theURL, theID Dim i

I am getting a blank PDF page when I print to the page.

Here is the part of my code

    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 seco开发者_开发问答nds
    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

Please help. I cant solve the problem. Have searched google and running out of ideas. Do i need to install the latest version of Adobe acrobat?


What version of ABCPDF are you using? IE9 breaks ABCPDF 7 and Below. So either uninstall IE9 or Upgrade to ABCPDF 8.

Hope this helps.


There's a troubleshooting guide for this issue here on WebSupergoo's support page:

6.7 - When I convert HTML I get an empty PDF...

Blank ouput from rendering a URL can have many causes. It's not uncommon to encounter security issues, but it could also be due to network issues, firewalls, DNS, caches, etc. So it's not possible to simply guess what might be wrong. You'll find the fastest way to solve this or narrow down the problem is to work through the troubleshooter.

ABCpdf doesn't actually make use of Acrobat, so it's unlikely that upgrading Acrobat will fix the issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号