This exception seems to be caused because the stream is not decrypted correctly and the stream data is corrupted. For instance when the stream is with FlateDecode filter the exception is InvalidDataException with message "Unknown compression method".