# How to copy bookmarks of included PDFs?

I want to create a document, which uses pages of other documents, while keeping the original bookmarks. There are some laconic answers pointing towards pax. The README of the pax package lists the following usage instructions:

Run java -cp pax.jar;pdfbox.jar pax.PDFAnnotExtractor bookmark.pdf. I substituted ; here for :, because of the Windows shell and the bookmark documentation for "usrguide.pdf". This step seems to work fine as the shell prints only: "* Processing file bookmark.pdf' ...", returns after that and "bookmark.pax" contains roughly 17,500 lines.

Running pdfLaTeX twice with MikTeX on the test.tex given below produces no errors either. The resulting PDF, however, lacks all bookmarks.

\documentclass[a4paper,12pt,landscape]{article}
\usepackage[
hmargin=1in,
vmargin=1in,
]{geometry}

\usepackage{pax}

\iffalse
\usepackage{hyperref}
\hypersetup{
filebordercolor={1 1 0},
}
\fi

\begin{document}
\includepdf[pages=-,nup=2x1]{bookmark}
\end{document}


Am I missing something in the usage of pax? Is there another package better suited for my purposes?

• Never used pax, but why disabling hyperref? No bookmarks without hyperref. – AlexG May 12 '17 at 12:59
• @AlexG pax reinserts pre-existent bookmarks extracted via pdfannotextractor. hyperef` is required to manage new annotations/links and to change default border colors of links. – Paul Gaborit May 12 '17 at 15:04
• Ah, I see. Thank you for the clarification! – AlexG May 12 '17 at 19:18
• A full example using a pax workflow is available at github.com/gi-ev/LNI-proceedings. Maybe, this helps? The typical issue with pax is that one does one pdflatex run too less. – koppor Sep 18 '17 at 6:12