6

I'm trying to get a pdf file I'm composing (using LaTeX et. al.) to have a functional hypertext link that will open a remote pdf file on the web (ideally in the same PDF viewer I'm using to read the one I'm composing although I don't think that's possible is it?) and then navigate to a certain page while fitting the height of that page to the viewing window.

Here's my MWE:

\documentclass[12pt]{article}
\usepackage{geometry} 
\geometry{letterpaper}  
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage[colorlinks=true,urlcolor=cyan]{hyperref}

\title{Brief Article}
\author{The Author}

\begin{document}
\maketitle


I want this \href[page=10,pdfremotestartview=FitV]{http://www.ctex.org/
documents/packages/layout/geometry.pdf}{link} to take me to page 10 of the 
linked PDF file while fitting the height of the page to the window. And while 
it does switch to my web browser which then downloads the PDF file and opens 
that file (using the browser plugin) in a browser window, the browser/plugin 
does not navigate to page 10 or fit the vertical height of the page to the 
window.

\end{document}

As I write in the MWE, it works part of the way, but not all the way.

Am I doing something wrong here?

I found this, but I think it's much more complex a problem than the one I face, and although it was helpful to me, it didn't completely solve the problem I'm having now.

Any suggestions?

7

These parameters for \href are only defined for "Remote Go-To Actions" (/GoToR), PDF files on the file system, not URLs.

In case of a URL the parameters can be given the following way:

\documentclass[12pt]{article}
\usepackage[colorlinks]{hyperref}

\begin{document}
\href{http://mirror.ctan.org/macros/latex/contrib/geometry/geometry.pdf#page=10&view=FitV}{link}
\end{document}

However, it depends on the browser and PDF plugin, whether and how these settings are working.

The parameters are specified in Adobe's "PDF Open Parameters".

  • I see. Thanks for clarifying. My only regret now is that this doesn't seem to work inside a pullquote environment. Any idea for a work-around on that? I see the words in the Adobe document that, "You cannot use the reserved characters =, #, and &. There is no way to escape these special characters." but that seems to relate to use of those three characters in the file URL itself rather than parameters for use in navigating the file. – TeXnewbie Aug 25 '13 at 0:12
  • @TeXnewbie: Which package provides pullquote? – Heiko Oberdiek Aug 25 '13 at 0:26
  • I think it's under development, but I have it working at least marginally right now, and it's really beautiful. – TeXnewbie Aug 25 '13 at 1:04
  • On a gut instinct, I tried escaping the # character with the \ character to make this in the Adobe Open Parameter, and although it breaks in html, it now works great in my .tex file within a pullquote environment too. Thanks very much @Heiko! – TeXnewbie Aug 25 '13 at 1:09
  • I'm experimenting with some of the other options in the hyperref package and I don't get the desired behavior from the pdfnewwindow=true option for URLs either. I'm guessing that's because it too is defined only for PDF files on the local filesystem? Is there some way to do the same thing for URLs? I don't see anything in Adobe's PDF Open Parameters. – TeXnewbie Aug 25 '13 at 4:11

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.