Besides the links, there might be other things you need to set for screen viewing or printing, so you will need some sort of a switch. This would normally go in the preamble of the document as shown below.
I will use the ifthen package for the boolean as people still find its syntax useful:
\usepackage{ifthen}
\newboolean{ForPrinting}
You then set the various parameters as:
\ifthenelse{\boolean{ForPrinting}}{}{}
What you normally need to take care of, is margins, link colors and the typing of urls. For the links you can define a command as:
\newcommand\link[2][1]{%
\ifthenelse{\boolean{ForPrinting}}{\url{#1}}
{\href{#1}{#2}}
}
The following MWE illustrates the technique and some typical values for settings:
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{ifthen}
\newboolean{ForPrinting}
%\setboolean{ForPrinting}{true}
%% Initialize values to ForPrinting=false
\newcommand{\Margins}{hmarginratio=1:1} % Symmetric margins
\newcommand{\HLinkColor}{blue} % Hyperlink color
\newcommand{\PDFPageLayout}{SinglePage}
%% Re-set if ForPrinting=true
\ifthenelse{\boolean{ForPrinting}}{%
\renewcommand{\Margins}{hmarginratio=2:3} % Asymmetric margins
\renewcommand{\HLinkColor}{black} % Hyperlink color
\renewcommand{\PDFPageLayout}{TwoPageRight}
\usepackage[body={5.25in,8.4in},\Margins]{geometry}
\usepackage[pdftex,
hyperfootnotes=false,
pdftitle={Project Name},
pdfauthor={Your name},
pdfkeywords={maths,equations},
pdfstartview=Fit, % default value
pdfstartpage=1, % default value
pdfpagemode=UseNone, % default value
bookmarks=true, % default value
linktocpage=false, % default value
pdfpagelayout=\PDFPageLayout,
pdfdisplaydoctitle,
pdfpagelabels=true,
bookmarksopen=true,
bookmarksopenlevel=1,
colorlinks=true,
linkcolor=\HLinkColor]{hyperref}}
\newcommand\link[2][1]{%
\ifthenelse{\boolean{ForPrinting}}{\url{#1}}
{\href{#1}{#2}}
}
\begin{document}
\section{One}
\link[http://tex.stackexchange.com/questions/ask]{Questions}
\section{Two}
\end{document}
setboolean{ForPrinting}{true}, uncomment the line. – yannisl May 30 '12 at 21:27