Some PDF files have an additional content added before the file header (before %PDF-1.4 for example). This additional content makes all byte offsets in the document invalid, which causes the format provider to throw an exception. At this point, to import a similar document it should be pre-processed so the content before the version header is removed before importing it.