Creating Clikable Links in PDFs

Deron Meranda deron.meranda at gmail.com
Sat Dec 25 04:45:23 UTC 2004


>>> Does anyone knows how to create a PDF using OOo which contains a
>>> hyperlinks and which can be clicked on to spawn the browser??

> You can sure do tis with LaTeX. With a correctly done LaTeX file, run
> pdflatex instead of latex and you'll have a pdf with clickable links and
> all. Do a google search for pdflatex.

You also may be interested in a PDF viewer which also is capable
of interpreting URL links.  Use xpdf version 3.0 (yum install xpdf).
Unfortunately ggv (ghostscript) does not handle URL links.

Just for completeness, there is a wonderful free Python package,
ReportLab, which can create PDF's, complete with support for
embedding URL links.  The specific method to do what you want
in in class Canvas named "linkURL()".  See http://www.reportlab.org/
It's a toollkit, so is more oriented towards developers, but it has some
front ends which for instance take your input source in simple XML
and render PDF.  (ReportLab is not part of Fedora so you'll have to
download and install yourself....it's easy though).

LaTeX though is your best option I think, until oOO gains that feature.
It's in the RPM package tetex-latex.   Below is a very simple LaTeX
document just to get you started, save as "linktest.tex".  Then run the
command "pdflatex linktest.tex".

-----CUT BELOW-----
% Test PDF generation with URL links    -*- LaTeX -*-
\documentclass[12pt]{report}
\title{A PDF link test}
\author{My Name}

\usepackage{times}   % important to force use of Postscript fonts for PDF
\usepackage[
  pdftitle={PDF link test},
  pdfauthor={My Name},
  pdfpagemode=UseOutline,
  pdfstartview=FitH,
  pdfpagelayout=TwoColumnRight,
  pdfpagelabels, pageanchor,
  bookmarks, bookmarksopen, bookmarksnumbered
]{hyperref}

\begin{document}

This is a sample link to \href{http://www.yahoo.com/}{Yahoo!}.

\end{document}
-----CUT ABOVE-----

Deron Meranda




More information about the fedora-list mailing list