1

I want to click on the link and open an attached PDF in a specific page.

Vitor Abella
  • 1,158

1 Answers1

1

If you are creating the document, you can either use \hypertarget to create the anchor name, or use \label and look in the aux file to find the corresponding anchor name. If you have no control over the document, you can read the PDF file with an ASCII editor and search for the list of names (if any).

Target document (named test4):

\documentclass{article}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{lipsum}% genertic text

\begin{document}
\lipsum[1-5]
\hypertarget{eq1}{\begin{equation}
x=a
\end{equation}}
\lipsum[6-10]
\end{document}

Main document:

\documentclass{article}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{lipsum}% genertic text

\begin{document}
As shown in \href[pdfnewwindow]{test4.pdf\#eq1}{(1)} we know that $x=a$.

You can find this equation on \href[pdfnewwindow]{test4.pdf\#page.2}{page 2}.
\end{document}

The page.2 anchor was generated by hyperref automatically. The is no guarantee it will work for all documents.

John Kormylo
  • 79,712
  • 3
  • 50
  • 120