Websupergoo AbcPDF on discountasp.net AddImageUrl not supported

Last post 07-21-2009 11:11 PM by qvo178. 4 replies.

Sort Posts:

  • Websupergoo AbcPDF on discountasp.net AddImageUrl not supported

    05-10-2007, 12:45 PM
    • Member
      214 point Member
    • fizzystutter
    • Member since 11-15-2006, 6:08 PM
    • Leeds, UK
    • Posts 176

    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

  • Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported

    05-11-2007, 5:25 AM
    • Star
      7,703 point Star
    • jeremyh
    • Member since 01-23-2003, 12:14 PM
    • York, England
    • Posts 1,378
    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.
  • Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported

    05-11-2007, 5:31 AM
    • Member
      214 point Member
    • fizzystutter
    • Member since 11-15-2006, 6:08 PM
    • Leeds, UK
    • Posts 176
    Hi Jeremy,

    Thanks for that, I'll take a look over the weekend.

    Thanks
    James
  • Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported

    05-11-2007, 7:08 AM
    • Member
      214 point Member
    • fizzystutter
    • Member since 11-15-2006, 6:08 PM
    • Leeds, UK
    • Posts 176
    Hi,

    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
  • Re: Websupergoo AbcPDF on discountasp.net AddImageUrl not supported

    07-21-2009, 11:11 PM
    • Member
      82 point Member
    • qvo178
    • Member since 08-18-2008, 9:35 PM
    • Posts 31

    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

Page 1 of 1 (5 items)