I am trying to open a PDF file from my VB.Net application. I get an error (pop-up) saying "File Does Not Begin with '%PDF-'. I would like to read the header of the file to determine if the file is corrupted or not. Right now I am using the Windows.Forms.WebBrowser control to display PDF files that I load from a database. Most of the files are loaded fine, but some are corrupt, hence the pop-up.
This is the line I use to load the file: webBrw.Navigate(Me.currentDocPath)
How can I do this in VB.Net 2010?