ABCpdf HTML Rendering?

Discussion in 'ASP.NET / ASP.NET Core' started by Rock, Jul 22, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Has anyone gotten the ABCpdf component to successfully render HTML? I'm trying with the simple examples off the WebSupergoo website, such as this:

    Dim theDoc As Doc = New Doc()
    theDoc.AddImage("http://www.google.com/")
    theDoc.Save(Server.MapPath("htmlimport.pdf"))
    theDoc.Clear()

    I'm also trying to pass in HTML strings via the AddImage method, without success. It always comes up as "WebSupergoo.ABCpdf3.PDFException: Unable to read file"

    I'm able to get the other methods working, such as creating a PDF from scratch, but not this. Could it be a problem with IE configuration on the server? WebSupergoo mentions in the docs that they use the IE parser for HTML.

    - Rob
     
  2. I've been able to get the AddImage to add an html page on my development computer, but found it very unuseful, so I never tried it on the server.

    If you want to pass html strings, you need to use the AddHTML method (I think, though I'm not looking at my code right this second). I found this the most effective way to format text and whatnot.

    I really do like ABCpdf, I'm so glad that discountasp.net provides it on the servers! Thanks guys!
    Jim
     
  3. Right. I've tested the AddHTML method and that seems to be working just fine on the server. However, that method only supports a limited subset of HTML tags, so it's not really what I'm looking for. Having access to MSIE rendering engine would open up a lot more possibilities.

    I've used ActivePDF (which also gives you the option to render pages with IE), and that's pretty cool, but it's also pretty pricey. ABCPdf sounds like a great alternative. Of course, I have to find a way to make it work first...

    - Rob
     
  4. Rob,
    Yeah, if you need to render whole html pages, the AddImage method is the way to go. It worked fine on my windows 2000 development pc. Could be an IE problem on the server.

    Oh, btw, I had a small scaling problem with the AddImage method. It rendered everything bigger than it should have been. I finally figured out that it was rendering at 96 dpi but adding to the pdf at 72 dpi so everything was big and cut off. I had to scale the "images" down to make it work right.

    Good luck
    Jim
     
  5. Takeshi Eto

    Takeshi Eto DiscountASP.NET Staff

    Unfortunately, the AddImage methodis not supported, see: http://kb.discountasp.net/article.aspx?id=10293

    Eric
    http://www.DiscountASP.NET - Microsoft Gold Certified Partner
    - asp.netPRO Magazine 2008 Readers' Choice Award for Best ASP.NET Hosting Service
    - asp.netPRO Magazine 2007 Readers' Choice Award for Best ASP.NET Hosting Service
    - Visual Studio Magazine 2007 Readers' Choice Award for Best .NET Hosting Service
     
  6. Folks, what exactly does AddImage not being supported mean to us developers? Does it mean none of our pdfs can contain our logos, etc. All we can have it tables and regular text. Seems a bit limited. Perhaps I'm missing something though.
     
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