Hacker News new | ask | show | jobs
by deca6cda37d0 2249 days ago
Thanks for your answer.

It is to protect against user errors. Your suggestion to check for a signature sounds what I'm looking for.

2 comments

Sorry, I missed this earlier. PDF spec turned into an ISO standard with 1.7, and became unavailable without paying since 2.0, but 1.7 at Adobe's site is pretty clear about the signatures (nice, simple section on headers :).

(My phone decided not to let me paste the URL, but it's a quick search away — do not be afraid of the spec, it's quite simple, esp the parts you care about)

Here is a list of file signatures[0] if you're looking for one.

[0]https://www.garykessler.net/library/file_sigs.html