Why does using \AtEndDocument{\printbibliography} cause the following warning?
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please rerun LaTeX.
Just to clarify: The references are displayed exactly like they should be. I'm just wondering why this warning is issued.
MWE:
\documentclass{book}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\AtEndDocument{\printbibliography}
\begin{document}
\cite{knuth:ct:c}
\end{document}
Note:
In case one wonders why this complicated syntax and not just using \printbibliography at the end of the document: This is just really convenient if used together with subfiles, see e.g. Bibliographies when using subfiles.