Unable to render HTML. No MSHTML document is available.

Discussion in 'Classic ASP' started by sanj, Oct 8, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,

    I hoping that some one can help, I'm using abcPDF when running from my development machine everything works but on our production server I recieve an error:

    Unable to render HTML. No MSHTML document is available.

    using the following code:

    PHP:
    Set theDoc Server.CreateObject("ABCpdf8.Doc")
    theDoc.Rect.Inset 2010

    theDoc
    .Page theDoc.AddPage()
    theURL "http://www.google.com"

    theID theDoc.AddImageUrl(theURL)

    Do
      
    'theDoc.FrameRect ' add a black border
      
    If Not theDoc.Chainable(theIDThen Exit Do
      
    theDoc.Page theDoc.AddPage()
      
    theID theDoc.AddImageToChain(theID)
    Loop

    For 1 To theDoc.PageCount
      theDoc
    .PageNumber i
      theDoc
    .Flatten
    Next

    theDoc
    .Save (Server.MapPath("test.pdf"))
    But the following works:

    PHP:
    Set theDoc Server.CreateObject("ABCpdf8.Doc")
    theDoc.Read (Server.MapPath("simple2.pdf"))

    Set theDoc2 Server.CreateObject("ABCpdf8.Doc")
    theDoc2.Read (Server.MapPath("simple3.pdf"))

    theDoc.Append theDoc2
    theDoc
    .Save (Server.MapPath(documentname))
     
  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

  3. Thanks Tasslehoff for your reply,

    I checked the forum post but this refers to ASP.NET, and I have tested this with .Net and it works but the error occurs only in ASP so maybe this is related to permissions in ASP.

    Regards,
     
  4. Apolgies but which forum?

     
  5. AmyCopp20 was a major forum spammer, please disregard that post.
     
  6. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    Yes, sorry about that. The messages have been cleaned up.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page