Please consider the following MWE, in a form of a batch file, which creates two tex files (one of them gets \includepdfd in the other):
cat > insert.tex <<'EOF'
\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, urlcolor=blue} %
\begin{document}
A test of url: \href{http://www.example.com}{http://www.example.com}
A test of cite: \cite{mytest}
\begin{thebibliography}{9}
\bibitem{mytest} Just Testing, \emph{Just Testing}, 2012.
\end{thebibliography}
\end{document}
EOF
pdflatex insert.tex
pdflatex insert.tex
pdfannotextractor insert.pdf
cat > includer.tex <<'EOF'
\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=red, citecolor=red, filecolor=red, urlcolor=red} %
\usepackage{pdfpages}
\usepackage{pax}
\begin{document}
\def\excerpt{\section{A test of inclusion}
Turns out we cannot just use includepdf in between section and
text, even if it is scaled down - must define the whole section
and use it as a pagecommand, see \url{http://tex.stackexchange.com/questions/5911/}.
}
\includepdf[pages=1,scale=0.6,frame,pagecommand={\excerpt},link]{insert.pdf}
\end{document}
EOF
# pdflatex includer.tex
# pdflatex includer.tex
xelatex includer.tex
xelatex includer.tex
If I compile the second file, includer.tex, with pdflatex - then all the links work fine in the includer.pdf.
However, if I try to compile includer.tex with xelatex (as in the example), I get:
! Package pax Error: Missing pdfTeX in PDF mode.
See the pax package documentation for explanation.
... after which, the process can continue - but no links in the included pdf work.
The error message is actually quite clear, in that pax doesn't as of yet support xelatex - but I was wandering if anyone, maybe, knows a hack/workaround, so the links would work also with xelatex?
pdftexprimitives supported between engines (pdftex,xetex,luatex) - and it's great to see there's some hope withluatexas it also supports (most) of thefontspecstuff... Many thanks again - cheers! – sdaau Jun 18 '12 at 03:17pdfannotextractor. I will retry. – egreg Jun 18 '12 at 06:54lualatexso far!?:)Cheers! – sdaau Jun 18 '12 at 07:00xetex,luatexdescends frompdftexand shares many of the specific primitives introduced by it. Some of them have been removed, because they can be emulated with Lua functions (whatpdftexcmdsdoes). – egreg Jun 18 '12 at 07:15