PDF Format: Check EOF when eating whitespaces.
Deleted duplicate code