I have question regarding XeLaTeX. I have switched from LaTeX to XeLaTeX because I wanted to use ttf fonts and now I have a problem with \hyperlink
. It works with text, but it doesn't with images.
So for example, when I click on the text: Dit hjem, I will go to page 2. It does not work with image.
My code:
\documentclass[landscape,a4paper,11pt]{article}
\special{papersize=297mm,210mm}
\usepackage{graphicx}
%\usepackage[pdftex]{graphicx}
\usepackage{hyperref}
\usepackage[danish]{babel}
\DeclareGraphicsExtensions{.png,.pdf,.jpg,.mps}
\usepackage[top=2cm, bottom=2cm, left=3cm, right=3cm]{geometry}
\usepackage[absolute]{textpos}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\usepackage{color}
\hypersetup{
bookmarks=true, % show bookmarks bar?
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
pdftitle={My title}, % title
pdfauthor={Author}, % author
pdfsubject={Subject}, % subject of the document
pdfcreator={Creator}, % creator of the document
pdfproducer={Producer}, % producer of the document
pdfkeywords={keyword1} {key2} {key3}, % list of keywords
pdfnewwindow=true, % links in new window
colorlinks=false, % false: boxed links; true: colored links
linkcolor=black, % color of internal links
citecolor=green, % color of links to bibliography
filecolor=magenta, % color of file links
urlcolor=cyan, % color of external links
pdfnonfullscreenpagemode=true,
linktoc=none,
pdfborder={ 0 0 0}
}
\begin{document}
\hyperlink{page.2}{\includegraphics[height=14.869mm, width=14.869mm]{images/tiger}}
\hyperlink{page.2}{\textblockcolour{white}{\fontsize{3mm}{5mm} \selectfont Dit hjem}}
\null\newpage
Some text
\end{document}
Best Answer
I was able to replicate your problem. I found a solution here: http://www.tug.org/pipermail/xetex/2005-October/002480.html
From the site:
Here's the command that does the work (again, from the site):
To be used as
Complete MWE follows: