One of the distinguishing features of that a PDF file must have is that the first line is [font=monospace]%PDF-n.n[/font] with [font=monospace]n.n[/font] being some version number such as [font=monospace]1.5[/font].
The second-to-last line is a byte length for the content (slightly less than the size of the entire file) and the last line is [font=monospace]%%EOF[/font].
Whether that's enough to confirm that you're looking at a PDF file depends on how sure you want to be that an alleged PDF file is actually a PDF file.
See also [man]finfo_file[/man].