2

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?

6
  • 1
    What happens if you put \pdfminorversion=7 as the first line of your .tex file? – cfr Jul 3 '18 at 2:52
  • Warnings about PDF version are suppressed, but the error Couldn't read xref table still happens. It is the same for \pdfminorversion=6. – naughie Jul 3 '18 at 3:28
  • 1
    the xref table is a very important part in the pdf, the main access to all the structures. It can be broken and if it is you will have to recreate the pdf. It is also possible that your pdf is correct and that you found a bug in pdftex, but without the pdf it is impossible to decide. – Ulrike Fischer Jul 3 '18 at 8:20
  • Then it is very likely that your PDF is broken. Note that a PDF can sometimes look OK in one viewer or another, but be reported damaged in another or by a processing tool. Generally, pdfTeX is not that particular - it will use PDFs which current Adobe won't, for example, but there are always limits to what any tool can tolerate. – cfr Jul 3 '18 at 22:21
  • What in "PDF file is damaged" do you not understand? – Martin Schröder Jul 6 '18 at 12:56
1

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.

1
  • I have forgotten what caused the problem in my case, but yeah somewhat illegal PDF may invoke this kind of errors. And, if I remember correctly, that was also what I encountered, and so amending the PDF recovered the problem. – naughie May 18 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.