WebSupergoo ABCpdf

Discussion in 'ASP.NET / ASP.NET Core' started by davidseye, Apr 12, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. 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?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    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>

    <form runat="server">
    <!-- Insert content here -->
    </form>
    </body>
    </html>



    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">
     
  3. 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.
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    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

    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">
     
  5. 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.exe" /t:library /utf8output /R:"c:\windows\assembly\gac\aspnetemail\2.0.0.514__bc571e8da1c1f543\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()
    ~~~
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    are u running this on your own workstation?

    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.exe" /t:library /utf8output /R:"c:\windows\assembly\gac\aspnetemail\2.0.0.514__bc571e8da1c1f543\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">
     
  7. 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.[:)]
     
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