There is a simple answer about pre-increment and pre-decrement if you are confused about them. Don't use them. Try this silly little code snippetSee what you get. Now repeat the whole exercise with ++i instead of i++.
Can you work out why you get different results? There is more in the Java Tutorial.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com