I am trying to identify a PDF-file in a binary data stream.
I realize a PDF starts with %PDF and ends with %%EOF, but since there can be multiple %%EOF markers in one file, how do I determine the actual file end?
For technical reasons, I would prefer to follow the direction of the PDF, i.e., go from %PDF to %%EOF.
Any comment is appreciated.