logoalt Hacker News

JKCalhounyesterday at 1:57 PM1 replyview on HN

Not necessarily a PDF attachment?

Someone who made some progress on one Base64 attachment got some XMP metadata that suggested a photo from an iPhone. Now I don't know if that photo was itself embedded in a PDF, but perhaps getting at least the first few hundred bytes decoded (even if it had to be done manually) would hint at the file-type of the attachment. Then you could run your tests for file fidelity.


Replies

swsieberyesterday at 2:39 PM

I'd say 99% of the time, the first 10 bytes would be enough to know the file type.