You appear to have posted the same thing twice, so we have deleted one copy. I added code tags, and doesn't it look bettyer Some of your lines, however, are long and would be illegible on a smartphone or similar.
I am afraid nobody is likely to read 1200 lines of code, so please look at this link about an SSCCE and post an SSCCE.
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