Click here to Skip to main content
15,941,828 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
How can I detect that pdf or any image is currently loaded on web browser control and also download them as pdf or any image format.

Thanks if you tell me answer
Updated 17-Mar-11 23:44pm

1 solution

Every file has a header in it, which contains information regarding its properties. Typical header starts with file type signature. eg. First two three letters will contain BM or PDF etc.

So if can read the header of the file, you will get to know what type it is.

I hope that should help.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900