TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I Want to print the borders of hyperref package in LaTeX. Using the package \usepackage{hyperref}, in the pdf file, some borders (red, green, etc) appears. When the document is printed the borders does not appear (which is logical).

Happens that I want to print those borders. Is it possible ?

share|improve this question
up vote 2 down vote accepted

Your PDF reader decides whether these borders are shown and/or printed. If you want to make sure these are printed, you can use normal frames instead:



This is a \href{http://tex.stackexchange.com/}{\framebox{link}}.

framebox creates a (black) frame, the hidelinks option to hyperref prevents the normal (non-printable) frame from showing up.

A macro to replace \href:

share|improve this answer
I have more than 100 hyper references in my document so I'm looking for an automatic solution. Is it possible to change the definition in the pdf reader or use another one to print the borders ? – PVaz Jul 30 '13 at 17:29
I don't know any PDF reader which will print these borders. Add the hidelinks, define a command for framed links (see my updated answer), and replace each occurrence of \href{ with the new macro. – fefrei Jul 30 '13 at 17:35
This will have problems if the linked text happens to be over two lines. For instance, try adding the following to the MWE: To get to your favorite site you need to click on the following \href{http://tex.stackexchange.com/}{\framebox{link to the \TeX{} Stackexchange site}}. with the \usepackage{showframe} to see. – Peter Grill Jul 30 '13 at 18:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.