I evaluate Aspose.Words & Aspose.Pdf for a customer, changing existing Word documents on several Bookmarks and convert them to PDF.
- Windows XP, IIS, .Net 2.0, ASP.Net 2.0, VB .Net, Aspose.Words 4.4.1, Aspose.Pdf 3.3.2, !!! NO Visual Studio or installed !!!
When I add in one of the .ASPX pages the VB code line
Dim doc As Document = New Document(“docword/d/1103.01.101.SOP_d.doc”)
I get the compilererror: BC30002: Type Document not defined
How do I have to alter the web.config file, so I can use the Aspose.Words & Aspose.Pdf objects?
(<add assembly…? <add namespace…? others…?)
artware Martin Bärtschi
ASP.Net 2.0 with VisualBasic Compiling-Error: BC30002: Type Document not defined
Thank you for asking this.
Please ensure you have registered the components in the GAC. The Runtime is unable to find them. You can do that as follows:
gacutil /i "\Aspose.Words.dll"
gacutil /i "\Aspose.Pdf.dll"
Here represents the place where you install the libraries. Then you add references right in the project so they will appear in the list that the system populates for you. Let me know if this helps you.
yes it worked (with a little addition in web.config)!
After registering the components with gacutil.exe, I had to add to the web.config the following:
- Do I have to add other namespaces for using Aspose.Words and Aspose.Pdf fully?
I think that you can also add reference to:
Aspose.Words.Drawing namespace contains classes that allow to create and modify drawing objects in Microsoft Word documents.
Aspose.Words.Reporting namespace contains classes that form the reporting engine of Aspose.Words.
Aspose.Words.Viewer namespace provides classes to render and print Word documents without utilizing Microsoft Word. (This namespace is currently in beta.)
For more information see API reference.