There are some cool mathematical tricks to swap two integers without using a temp variable, but this is the kindest solution to future readers of your code. Hope that helped. And hope I haven't just stepped in and done somebody's homework.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
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