Created attachment 11315 [details] A PDF file where mupdf reports a broken xref. The attached file was produced by pdfseparate(1), a utility that comes with poppler-utils. Reading it with mupdf says warning: broken xref section, proceeding anyway. warning: ... repeated 3 times ... The page renders quite OK. I reported this to poppler people, who don;t find anything wrong with the page, and ask that I ask here: what exactly is wrong with the xref here? Thank you Jan
This is a case where the problem is only detectable at a different point to the actual error. The actual error is in the file Trailer dictionary, where the /Size is given as 10, but the highest object number in the xref table is in fact object 19. The /Size in the Trailer dictionary isn't the number of entries which the xref table in the PDF file contains (and even if it was, 10 isn't correct, there are 11 definitions in this file), its the number of entries in the xref table. From Table 3.13 (page 97 in the 1.7 PDF Reference): "Size integer (Required; must not be an indirect reference) The total number of entries in the file’s cross-reference table, as defined by the combination of the original section and all update sections. Equivalently, this value is 1 greater than the highest object number used in the file. Note: Any object in a cross-reference section whose number is greater than this value is ignored and considered missing." So the correct value for /Size in the PDF file should be 20, not 10. If I correct that, then the problem goes away. That should be enough information for the creators of the PDF file to correct the problem. Its unfortunate that the error implicates the xref table, but there is no way to tell which is in error, the Trailer or the xref. Since the file genuinely is incorrect I'm closing this as 'invalid'.