ABCpdf5

Discussion in 'ASP.NET / ASP.NET Core' started by Jerry_Shorma, Aug 9, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am new to .net and I am trying to use ABCpdf on my new site. I am simply trying to copy the code that is in the example for Visual Basic. The line in red below is failing. The first word "Doc" is not defined. I have added a line to dim doc and it still does not like it. Is there a problem with this example?

    Thanks,

    Jerry




    Dim theID As Integer = 0


    Dim theText As String = "This PDF file is generated by WebSupergoo ABCpdf.NET on the fly"


    Dim theDoc As Doc = New Doc


    theDoc.Width = 4


    theDoc.FontSize = 32


    theDoc.Rect.Inset(20, 20)


    theDoc.FrameRect()


    theID = theDoc.AddHTML(theText)


    While theDoc.GetInfo(theID, "Truncated") = "1"


    theDoc.Page = theDoc.AddPage()


    theDoc.FrameRect()


    theID = theDoc.AddHTML("", theID)


    End While


    theDoc.Save(Server.MapPath("textflow.pdf"))


    theDoc.Clear()


    Response.Write("PDF file written")


    Response.Write("<a href=""textflow.pdf"">View PDF File</a>")
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    You need these lines in your code

    <%@ Assembly name='ABCpdf, Version=5.0.0.6, Culture=neutral, PublicKeyToken=a7a0b3f5184f2169' %>
    <%@ import Namespace='WebSupergoo.ABCpdf5' %>

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
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