Using aspose, I have converted the first page of a pdf document to a jpeg (to be used as a thumbnail in a ‘Documents’ section to one of my asp.net pages). This is, upto this point, stored in a FileStream – but I need a byte array to assign to the datavalue of an Image control. Can anyone point me in the right direction to converting this? I’ve had a good look around and I can’t find the solution.
Thanks a lot.
This should work:
byte[] data = File.ReadAllBytes("path/to/file.jpg")