PDA

View Full Version : WebSupergoo ABCpdf


davidseye
04-12-2003, 07:53 AM
I thought I would get acquainted with the new ABCpdf component. I am baffled from step one. I have read through the documentation and wrote the simples page to get started, using the very code from the documentation and all I get is the the type Doc is not defined. I installed the evaluation version of ABCpdf on my machine here and get the same error. Anyone have any ideas?

bruce
04-12-2003, 09:32 AM
Try this and see if it works.

<%@ Page Language="VB" %>
<%@ Assembly Name="ABCpdf, Version=3.1.0.36823, Culture=Neutral, PublicKeyToken=a7a0b3f5184f2169" %>
<%@ import Namespace="WebSupergoo.ABCpdf3" %>


<script runat="server">


Sub page_load()

Dim theID As Integer = 0
Dim theText As String = "This PDF file is generated by 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>")

End Sub


</script>
<html>
<head>
</head>
[b]
<form runat="server">
<!-- Insert content here -->
</form>
</body>
</html>



[b]quote:Originally posted by davidseye

I thought I would get acquainted with the new ABCpdf component. I am baffled from step one. I have read through the documentation and wrote the simples page to get started, using the very code from the documentation and all I get is the the type Doc is not defined. I installed the evaluation version of ABCpdf on my machine here and get the same error. Anyone have any ideas?
</blockquote id="quote"></font id="quote">

davidseye
04-12-2003, 10:04 AM
Thanks. You are still the Bruce.

Yes that did make it work. I shall now expand on this and see what I can learn. One curious question. In the documentation it says that the .NET dll's are ABCpdf.dll and ABCpdf2.dll, while in the ASP version the dll is ABCpdf3.dll. Here you are invoking in the Namespace 'WebSupergoo.ABCpdf3'. Is that a reference to the dll used or the version? The Supergoo documentation uses Namespace 'WebSupergoo.ABCpdf'. What you have done works, the other does not. I was just wondering if you could explain this discrepancy to me so I wouldn't be so stupid.

bruce
04-13-2003, 11:22 AM
Thank you for pointing that out.

I believed the link to the documentation on websupergoo's site is wrong.

This is the correct one, http://websupergoo.com/helppdf3net/frames.htm

I'll forward it to the web developer to update the site.

Thanks

[b]quote:Originally posted by davidseye

Thanks. You are still the Bruce.

Yes that did make it work. I shall now expand on this and see what I can learn. One curious question. In the documentation it says that the .NET dll's are ABCpdf.dll and ABCpdf2.dll, while in the ASP version the dll is ABCpdf3.dll. Here you are invoking in the Namespace 'WebSupergoo.ABCpdf3'. Is that a reference to the dll used or the version? The Supergoo documentation uses Namespace 'WebSupergoo.ABCpdf'. What you have done works, the other does not. I was just wondering if you could explain this discrepancy to me so I wouldn't be so stupid.
</blockquote id="quote"></font id="quote">

prainey
08-20-2003, 11:01 AM
I used the VB example given by Bruce. but get this following error message...

c:\windows\system32\inetsrv> "c:\windows\microsoft.net\framework\v1.1.4322\vbc.e xe" /t:library /utf8output /R:"c:\windows\assembly\gac\aspnetemail\2.0.0.514__bc5 71e8da1c1f543\aspnetemail.dll" ......

Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

E:\web\webspacedev\htdocs\vbpdfexample.aspx(14) : error BC30560: 'Doc' is ambiguous in the namespace 'WebSupergoo.ABCpdf3'.

Dim theDoc As Doc = New Doc()
~~~

bruce
08-20-2003, 11:13 AM
are u running this on your own workstation?

[b]quote:Originally posted by prainey

I used the VB example given by Bruce. but get this following error message...

c:\windows\system32\inetsrv> "c:\windows\microsoft.net\framework\v1.1.4322\vbc.e xe" /t:library /utf8output /R:"c:\windows\assembly\gac\aspnetemail\2.0.0.514__bc5 71e8da1c1f543\aspnetemail.dll" ......

Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

E:\web\webspacedev\htdocs\vbpdfexample.aspx(14) : error BC30560: 'Doc' is ambiguous in the namespace 'WebSupergoo.ABCpdf3'.

Dim theDoc As Doc = New Doc()
~~~

</blockquote id="quote"></font id="quote">

prainey
08-20-2003, 11:20 AM
Ok, looks like I had a copy of ABCpdf.dll in my BIN directory seems to have fixed the error. Must have conflicted with the DiscountASP version/copy.[:)]