David has a very important question. How you set an environment variable is dependent on what operating system you use. it won't help for someone to give you directions on how to do it in Unix when you are running Mac OS X. it is important to tell the details.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
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