# How can I prevent URLs from being clickable?

I want to stop every URL in my document from being clickable in the resulting PDF.

I am using the url package, and the documentation claims that it "does not make hyper-links." So, I don't know why links are becoming clickable!

I also have some specific requirements that are met by the url package and not by the hyperref package, so simply using the hyperref package is probably not an option for me.

I'm using TeXShop 3.11 with Pdftex. The minimal example below generates a document with a clickable link to www.google.com when viewed in Preview.app in OS X 10.9.4.

\documentclass[10pt,letterpaper]{article}

\usepackage[hyphens]{url}
\urlstyle{same}

\begin{document}

\end{document}

-

It's your PDF viewer's fault: Mac OS X Preview (at least v7.0) recognises URLs and makes them clickable, whether they be typeset with a special package (hyperref, url) or not.

To convince yourself, try compiling the following example and open the output in Preview; the URL will be clickable.

So there's really nothing you can do about it on the author's side.

\documentclass{article}
\begin{document}
\end{document}

-
Thank you sir, I appreciate it! – andrewinfosec Aug 8 '14 at 23:01
This seems to happen with other readers as well (I tried it with Sumatra PDF) – Scz Aug 9 '14 at 7:00
PDF-XChange Reader too – kapep Mar 7 '15 at 22:18

This problem seems to come from the pdf reader that is used. Therefore my idea is to add something invisible that breaks up the url for the program but not for the person reading it. Something like \url{www.google}\rlap{~}{.com} does not work, though, because the space ~ is ignored.

An ugly workaround that works for me (with Sumatra PDF) is:

\url{www.google}\rlap{ \color{white}X}{.com}


with \usepackage{color} in the preamble. Make sure to include the space, as otherwise there will be a link to www.googleX.com.

However, this only works if your background is white. Another downside is that you will not be able to copy the original url from the document. Maybe you can play around and replace X with something invisible.

-
Thank you! Once I learnt from the first answer that the cause is the PDF reader itself, I accepted that it's probably not something that I can fix (at least not easily). The ideas you propose are interesting however, and I appreciate your efforts! – andrewinfosec Aug 10 '14 at 19:32
Thanks! The stackexchange.com way to show your appreciation would be an upvote ;-) – Scz Aug 11 '14 at 16:24
Done! (I'm still new....) :-) – andrewinfosec Aug 12 '14 at 16:33