Hi Edgar,
you must read the Headerinformation of the Files you want to check.
An BMP allways starts in the first 2 Bytes with 'BM' Hex 42, 4d
A ZIP File with 'PK' Hex 50, 4b
A PDF iam not shure but it looks like '%PDF' Hex 25,50,44,46
In Text or other Files you are not able to check it.
CU,
Sven
If you post a reply, kindly refrain from emailing it, too.