Skip to content

The error message "\pdfendlink ended up on a different page" is usually due to a hyperlink (perhaps a citation, or a URL, or cross-reference) somewhere in your PDF, that's breaking across two page (i.e. starting near the end of one page and end on the next). (Citations are possible culprits.) pdfLaTeX can't deal with this, and will raise a compile error in TeX Live 2020 and earlier. (This will manifest as a warning in TeX Live 2021 and later.)

As you continue to write more contents, the texts will move around, and the hyperlinks may end up on the same page after all—so you may see that this error seems to "come and go". For a temporary workaround, so that you can continue working on your project without getting this error, you can disable hyperlinks in your document by writing

\hypersetup{draft}

just before your

\begin{document}

and comment this out when you've finished all your writing. If you're unlucky enough to encounter this problem again at that point, re-enable the draft, and then go through your PDF to find the possible offender (citations, cross-references, floats at top of pages...), so that you can (hopefully) reword your text to avoid the problem.

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX