8

The hyperref in moderncv for urls and the email address cannot be opened with adobe acrobat reader. The links are working in other pdf readers. It's only an issue with moderncv opened in adobe acrobat reader. I tried to make a minimal example that shows the behavior. It is the same for \href and \url. Does anybody know a resolution?

\documentclass[11pt,a4paper]{moderncv}

\moderncvtheme[grey]{classic}
\firstname{Test}
\familyname{Test}

\begin{document}

\cventry{2012}{test}{test}{\texttt{\href{http://www.google.com}{click me}}}{}{}
\cventry{2012}{test}{test}{\texttt{\url{http://www.google.com}}}{}{}

\end{document}
  • 2
    Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). You can also use backticks ` to mark your inline code as I did in my edit. – Herr K. Oct 28 '13 at 2:22
  • Works for me without problem. – Werner Oct 28 '13 at 2:32
  • You might check your security preferences in Acrobat Reader. In particular, the "Trust Manager" settings. – Paul M. Oct 28 '13 at 2:43
6

I ran into the same issue with Adobe Acrobat 9 and Acrobat X Pro on two different computers. Strangely, I did not encounter an error using TeXstudio's internal PDF viewer -- the links work as is.

I started with this MWE based on the one in the question:

\documentclass[11pt,a4paper]{moderncv}

\moderncvtheme[grey]{classic}
\firstname{Test}
\familyname{Test}

\begin{document}

\cventry{2012}{test}{test}{\texttt{\href{http://www.google.com}{http://www.google.com}}}{}{}

\end{document}

When attempting to click a link using Acrobat I receive the following error:

enter image description here

I found an alternate solution based on an1234's answer: add \AtBeginDocument{\hypersetup{baseurl={}}} in the preamble (you can also add other options like colorlinks). Acrobat no longer generates the error with the fixed MWE:

\documentclass[11pt,a4paper]{moderncv}

\moderncvtheme[grey]{classic}
\firstname{Test}
\familyname{Test}

\AtBeginDocument{\hypersetup{baseurl={}}}

\begin{document}

\cventry{2012}{test}{test}{\texttt{\href{http://www.google.com}{http://www.google.com}}}{}{}

\end{document}

I think this solution is preferable since you don't have to modify the moderncv.cls file.

  • 1
    Wow, this worked great without having to modify external files, thanks! – JorgeGT Jun 27 '15 at 20:24
  • @JorgeGT Happy to help. – Null Jun 27 '15 at 21:12
3

On the moderncv.cls file I removed the baseurl= http:// option under \hypersetup and it worked. I'm not sure why but it did.

1

Actually, I face exactly the same issue with Adobe Acrobat Reader 9.

The url works in other pdf readers, but not in adobe.

I think you gotta update the Adobe Acrobat Reader to a higher version (>10).

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.