By specification, the last line of the file contains only the end-of-file marker, %%EOF. If the file contains many trailing bytes at its end, a NotSupportedException: 'StartXRef keyword cannot be found.', is thrown.
Workaround: Trim any content after the end-of-file marker (see FixInvalidEndOfFile).