PDA

View Full Version : ABCpdf5


kofcmember1
08-09-2005, 01:08 AM
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[b]")


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

bruce
08-09-2005, 06:29 AM
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 (http://www.DiscountASP.NET)