abcPDF.NET - Windows 14001 error when calling .AddImageUrl ('Unable to render HTML' )

Discussion in 'ASP.NET 2.0' started by Buzzuti, May 15, 2006.

  1. Has anyone encountered this error using abcPDF?
    I read through their support pages and everything is server side (permissions)settings and I havebeen unableto rectify this issue. Code works indevelopment environment, yet cannot get behind this error on Discount.

    Any help is much appreciated!
    BZ

    Post Edited (Buzzuti) : 5/16/2006 6:36:03 PM GMT
     
  2. Ok. I tried the most basic of basic test from WebSupergoo's web site to try further pinpoint the issue.
    I receive the following error:

    Unable to render HTML. Unable to create MSHTML document. Windows error 5. Access is denied. Unable to create MSHTML document. Windows error 5. Access is denied. Unable to create MSHTML document. Windows error 5. Access is denied.

    Here is the code;


     
  3. Well, I came up with a solution. I stepped away from using the internal abcPDF facilities and implemented the StringWriter object and captured the page output by calling the Execute method of the Server Object.

    Works well, the only way I could get away from the permissions issue. There still might be a better way to do it, but unfortunantely I am in a positionwhere the boss says 'get results' which means now...

    Rick Strahl has a pretty good article on some other uses for these facilities and then some:
    http://west-wind.com/weblog/posts/481.aspx

    Here is my work around to the problem...
     
  4. Oops, jumped the gun...
    A quick typo:


     
  5. Wow. It just hit me in a very distasteful way...


    I think the only solutions (as of now in my mind) is
    1. I stick with the Execute method of the Server Object
    2. Take the retrieved html and save it to a "temp" file on my site, out of the way
    3. Call that "temp" file using the AddImageUrl method of abcPDF (that way we preserve the images and external CSS file styles...)
    4. Build the PDF
    5. Delete the "temp" file in the Finally block if it was created....


    This all sounds very painful and a high price on resources. Ouch...


    Wait a second, that still puts me back to square one with the permissions issue...
    Scratch that whole idea...



    Does anyone out there have any suggestion outside of this box I have myself stuck in?


    Thanks for your ear, or eyes rather,
    BZ



    Post Edited (Buzzuti) : 5/16/2006 7:17:26 PM GMT
     
  6. We do not support the AddImageUrl method or any methods that ABCpdf used to retrieve HTML data from the internet. That's because it will use the Internet Explorer engine, which on the server has very restrictive permissions.

    Sources for your PDFs must reside from files on your site or from user input.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  7. Well, I am bummed, but understanding and appreciative...
    Back to the drawing board...

    Many thanks!
     
  8. Server side object should never use IE to pull data. It makes me question whether or not I should be using that component at all.



    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  9. Not good at all...

    Now I need to figure out the best facility to get a dynamic report (which is already created via a aspx page) into a PDF.
    Was looking for a time saving method without having to write a ton ofadditional code.
    Based on both of your insight on the abcPDF inner workings, it is most definitely not a direction I want to head.
    I guess I am writting code using the basic abcPDF facilities, yet Joel that same question pops into my head as well.
    Should I even use it? Any reccomendations?

    I appreciate it!
    BZ
     
  10. Well, unfortunately I haven't used any pdf generation software. abcpdf.net is the only one I really know.



    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     

Share This Page