# [Tex/LaTex] PDF inclusion error when using \input or \include

errorsincludeinputpdftex

I have set up a LaTeX file for a book-type document with the following preamble:

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{textgreek}
\usepackage{gensymb}
\usepackage{csquotes}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage[backend=bibtex8,style=chem-angew,doi=true]{biblatex}
\usepackage{wrapfig}
\usepackage{chemmacros}
\usepackage{psfrag}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{chemnum}


Now, when I make a document were everything is included after the preamble, that includes a figure with TMP – tags, all works out fine, the tags are replaced with compound numbers.

\begin{document}
\cmpd*{Bla}
\cmpd*{Blab}
blalba\cite{text}

\begin{figure}[h]
\centering
\replacecmpd{Bla}
\replacecmpd{Blab}
\includegraphics{rxn.eps}
\caption{\ortho-selective chemistry.}
\end{figure}
\printbibliography
\end{document}


If, however I copy all the content of the document into an additional file like this:

\begin{document}
\input{text}
\end{document}


I get the following error:

pdfTeX error: pdflatex (file ./main-pics.pdf): PDF inclusion:
required page does not exist <1>


Can anyone explain this? The .log file is not really conclusive. The problem does not change when I use \include instead of \input I really don't want to put everything into one file.

edit: I forgot, I am using MacTeX 2015.