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>")
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>")