[Tex/LaTex] How to preserve hyperlinks in included PDF

graphicshyperreflinkspaxpdf

I have generated PDFs with figures that have hyperlinks (hyperref to websites, \href) in them. When I compile these figures standalone the hyperlinks work. But when I try to include these PDFs (as figures, not the sources) with \includegraphics the links are lost and only the image is inserted in the document.

Is there a way to include (\includegraphics?) a PDF such that its original links work in the master document?

This question has to do with the externalization (e.g. TikZ or PGFPlots), which also suffers from these drawbacks, i.e. hyper-references are lost.

Best Answer

You can not simply mix two PDF files. You have to preserve PDF document structure. In the simply case links (PDF annotations) are dropped.

You can try the PAX project, which trys to extract and reinsert the PDF annotations.