This means that my reporting feature won't work now.
I contacted websupergoo about this and there response was:
"ABCpdf uses the Microsoft MSHTML component (installed with Internet Explorer) to process HTML. If your host has prevented MSHTML from accessing the Internet, perhaps it would be possible to access a URL based on the IP address of your server, a "localhost://"
or "file://" format URL."
Can anybody shed any light on this ?
I have the IP address of the server and my code at the moment is as follows:
Dim varFileName = "../System/LoggedIn/CreatedTextFiles/" & DateTime.Now.ToString("mmssffffff") & ".pdf"
Dim theDoc As Doc = New Doc()
theDoc.Rect.Inset(72, 144)
While True
theDoc.FrameRect()
If Not theDoc.Chainable(theID) Then
Exit While
End If
theDoc.Page = theDoc.AddPage()
theID = theDoc.AddImageToChain(theID)
End While
Dim i As Integer
For i = 1 To theDoc.PageCount
theDoc.PageNumber = i
theDoc.Flatten()
Next
Use System.Net namespace - WebRequest to get the page and then pass the data into the pdf function.
Regards
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
Just tried the webrequest but obviously all I get back is the html, which would be ok in other scenarios, but in this one, the code isn't rendered so all I get on the pdf is the source code.
I'm just looking through the abcpdf documentation to see if there is a way of rendering the code once it has been passed.
Both the AddHtml and AddImageHtml functions have been disabled by discountasp.net
fizzystutter
Member
214 Points
191 Posts
Websupergoo AbcPDF on discountasp.net AddImageUrl not supported
May 10, 2007 04:45 PM|LINK
Hi,
I have my hosting with discountasp.net and want to be able to pass a url in the pdf object.
I've just found out that for security reasons:
"the AddImage is not supported on our server, for more information, please see our kb article at:
http://kb.discountasp.net/article.aspx?id=10293"
This means that my reporting feature won't work now.
I contacted websupergoo about this and there response was:
"ABCpdf uses the Microsoft MSHTML component (installed with Internet Explorer) to process HTML. If your host has prevented MSHTML from accessing the Internet, perhaps it would be possible to access a URL based on the IP address of your server, a "localhost://" or "file://" format URL."
Can anybody shed any light on this ?
I have the IP address of the server and my code at the moment is as follows:
Dim varFileName = "../System/LoggedIn/CreatedTextFiles/" & DateTime.Now.ToString("mmssffffff") & ".pdf"
Dim theDoc As Doc = New Doc()
theDoc.Rect.Inset(72, 144)
Dim theID As Integer
theID = theDoc.AddImageUrl("http://ufs.thefrogsystem.com/ufs/Default.aspx")
theDoc.Color.String = "0 0 0 "
theDoc.FontSize = 50
theDoc.AddText(DateTime.Now)
While True
theDoc.FrameRect()
If Not theDoc.Chainable(theID) Then
Exit While
End If
theDoc.Page = theDoc.AddPage()
theID = theDoc.AddImageToChain(theID)
End While
Dim i As Integer
For i = 1 To theDoc.PageCount
theDoc.PageNumber = i
theDoc.Flatten()
Next
theDoc.Save(Server.MapPath(varFileName))
theDoc.Clear()
PDFLink.NavigateUrl = varFileName
PDFLink.Target = "_Blank"
Thanks
James
jeremyh
Star
8173 Points
1477 Posts
Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported
May 11, 2007 09:25 AM|LINK
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
fizzystutter
Member
214 Points
191 Posts
Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported
May 11, 2007 09:31 AM|LINK
Thanks for that, I'll take a look over the weekend.
Thanks
James
fizzystutter
Member
214 Points
191 Posts
Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported
May 11, 2007 11:08 AM|LINK
Just tried the webrequest but obviously all I get back is the html, which would be ok in other scenarios, but in this one, the code isn't rendered so all I get on the pdf is the source code.
I'm just looking through the abcpdf documentation to see if there is a way of rendering the code once it has been passed.
Both the AddHtml and AddImageHtml functions have been disabled by discountasp.net
Thanks
James
qvo178
Member
96 Points
45 Posts
Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported
Jul 22, 2009 03:11 AM|LINK
This error message really frustrate me after spending many hours finally I got it working thank god.
Basicall you can set the localhost url and it will works just fine. Check out how to do it here.
http://itjungles.com/dotnet/abc2pdf-unable-to-render-html