We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Com.aspose.words.* not found

Hi,

I am new to aspose. In fact, I am working for the first time on aspose. This is my first day.

I was going through the programmer's guide and some simple tutorials. I copied the Aspose.Words.jdk16.jar to my project lib folder but still I am not able to find the com.aspose.words.* . i.e. they are not being included in my project. Can anybody help?

Any help would be highly appreciated.

Hi,

In a simple java application, you can place Aspose.Words.jdk16.jar inside the bin folder of JDK and use the following code lines to access Aspose.Words for Java functionalities.

Or If you are using Eclipse IDE, you can create a simple project, add a class and once the class is created, select Project menu option -> Properties -> Java Build Path -> select Libraries tab -> press Add External JARs button. Provide the path of Aspose.Words.jdk16.jar. The library becomes available in project.

import com.aspose.words.*;
public class Words {

public static void main(String[] args) {

// TODO Auto-generated method stub
try
{
// create a document object
com.aspose.words.Document doc = new com.aspose.words.Document();
} catch(Exception ex)
{
System.out.println(ex);
}

}

}

Thanks a lot moeen.Tariq

your suggestion solved my problem.. But there is another problem now.

Every time I try to append some text in the document(.docx, .doc, .pdf) it gets appended on the top of already existing text. I want to append it at the end of the already present text, which is normally the case.. Any suggestions..

Hi

Thanks for your request. If you are using DocumentBuilder to insert text into your document, you should simply call DocumentBuilder.moveToDocumentEnd method before inserting text:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/documentbuilder.html#moveToDocumentEnd()

Best regards,

Thank you alexey...

You guys are really very helpful...

Thanks a lot..