Reputation: 7589
I'm using ABCPdf to convert HTML to a PDF. I'm using the method:
AddImageUrl()
This works fine in Dev and UAT, but on Production I continuously get the message:
Unable to render HTML. Unable to load page
Anyone see this before? Need more info?
-Ev
Upvotes: 10
Views: 21251
Reputation: 61
The default timeout for abcpdf is 15 seconds. If the page is taking longer than 15 seconds, you will get this exception.
Add the line below just after object creation of the document to resolve the issue.
theDoc.XHtmlOptions.Timeout = 10000000;
Upvotes: 2
Reputation: 11
I found by working backwards (removing elements) from a target html page that omitting the tag (of all things) created this error. also, calling localhost in the target url generated this error.
Upvotes: 1
Reputation: 2924
I guess you are tying to do URL->pdf generation. It is difficult to directly to do URL->pdf conversion. We ended up URL-Save HTML in local folder ->read HTML and convert to PDF-> delete HTML file from folder - tricky approach but it works. The only flaw is that you need to give read/write permission on a folder on server. Its still better than decreasing security settings.
Upvotes: 3
Reputation: 7589
I have no idea what caused this error, but I stopped the scheduled task that was running, then restarted it and it's worked fnie ever since.
Upvotes: 0
Reputation: 79
have you take a look at this http://www.itjungles.com/dotnet/abc2pdf-unable-to-render-html
Upvotes: 1