[Tex/LaTex] What does “Couldn’t read xref table” mean

pdfpdftex

I want to concatenate some PDFs into one via pdftex, so wrote the tex file like:

% foo.tex
\documentclass[a4paper]{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[nup=1x1, pages=-]{01-0_pp_i_iv_Frontmatter.pdf}
% and more
\end{document}

But I got an error while running pdflatex foo.tex:

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./foo.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2017/texmf-dist/tex/latex/pdfpages/pdfpages.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/tools/calc.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/eso-pic/eso-pic.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/atbegshi.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/pdfpages/pppdftex.def))
No file foo.aux.
(/usr/local/texlive/2017/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2017/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/local/texlive/2017/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/local/texlive/2017/texmf-dist/tex/latex/oberdiek/pdflscape.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/lscape.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/ifxetex/ifxetex.sty))

pdfTeX warning: pdflatex (file ./01-0_pp_i_iv_Frontmatter.pdf): PDF inclusion:
found PDF version <1.6>, but at most version <1.5> allowed


pdfTeX warning: pdflatex (file ./01-0_pp_i_iv_Frontmatter.pdf): PDF inclusion:
found PDF version <1.6>, but at most version <1.5> allowed


pdfTeX warning: pdflatex (file ./01-0_pp_i_iv_Frontmatter.pdf): PDF inclusion:
found PDF version <1.6>, but at most version <1.5> allowed


pdfTeX warning: pdflatex (file ./01-0_pp_i_iv_Frontmatter.pdf): PDF inclusion:
found PDF version <1.6>, but at most version <1.5> allowed
[1 <./01-0_pp_i_iv_Frontmatter.pdf>]

pdfTeX warning: pdflatex (file ./01-0_pp_i_iv_Frontmatter.pdf): PDF inclusion:
found PDF version <1.6>, but at most version <1.5> allowed
[2 <./01-0_pp_i_iv_Frontmatter.pdf>]

pdfTeX warning: pdflatex (file ./01-0_pp_i_iv_Frontmatter.pdf): PDF inclusion:
found PDF version <1.6>, but at most version <1.5> allowed
[3 <./01-0_pp_i_iv_Frontmatter.pdf>]

pdfTeX warning: pdflatex (file ./01-0_pp_i_iv_Frontmatter.pdf): PDF inclusion:
found PDF version <1.6>, but at most version <1.5> allowed
[4 <./01-0_pp_i_iv_Frontmatter.pdf>]

...(Omitted)...

pdfTeX warning: pdflatex (file ./08-0_pp_45_70_Properties_of_extension_rings.pd
f): PDF inclusion: found PDF version <1.6>, but at most version <1.5> allowed
[83 <./08-0_pp_45_70_Properties_of_extension_rings.pdf>]

pdfTeX warning: pdflatex (file ./08-0_pp_45_70_Properties_of_extension_rings.pd
f): PDF inclusion: found PDF version <1.6>, but at most version <1.5> allowed
[84 <./08-0_pp_45_70_Properties_of_extension_rings.pdf>]Syntax Error: Couldn't read xref table
Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table

!pdfTeX error: pdflatex (file ./09-0_pp_71_91_Valuation_rings.pdf): xpdf: readi
ng PDF image failed
 ==> Fatal error occurred, no output PDF file produced!

The error says that the PDF is damaged, but, as far as I saw in PDF viewer, PDFs seem to be right.

What does this error (in particular, "Couldn't read xref table") mean? Can PDFs be broken? Or, How can I fix such an error?

Best Answer

I had encountered the same issue, when I inserted several images (in eps format) into the latex document. While it was compiling I had accidentally cleared all the auxiliary files (Using Tools->Clean auxiliary files option in Tex-studio). I was unable to get the output. Then I found that an eps was converted halfway as Pdf (in corrupted condition). I simply deleted that Pdf and guess what, the compilation was successful and I can now view my output.