Creating a thumbnail from pdf using c# - orientation is important
===

I have been trying to create an image from PDF using c#, I have this working perfectly using the code from the example below

http://homeofcox-cs.blogspot.com.au/2008/10/c-convert-pdf-to-image-format.html

however, if the pdf is landscape then the thumbnail is not made correctly (it still thinks it's portrait and even the height/width properties are showing this as portrait). 

My question is, is it possible to create a portrait or landscape thumbnail from a PDF based on its orientation?