I'm using pdfpages to combine multiple pdf documents; I would also like a front 'contents' page for the new file, using hyperref to allow me to jump directly to the correct page. The 'addtotoc' option in pdfpages almost works... the link produced by that goes to the correct page, but a few lines down from the start. Any suggestions?
The sample code below also shows a workaround using \hyperlink
- but this file will potentially have to be maintained/updated by other people who may not be so familiar with \LaTeX
, so the more that can be automated (ie the less changes needed for each additional file), the better.
\documentclass{article}
\usepackage{pdfpages}
\usepackage[pdfstartview=FitH,bookmarks=true,colorlinks=true,linkcolor=blue]{hyperref}
\usepackage{bookmark}
\bookmarksetup{color=blue}
\setlength\parindent{0pt}
\begin{document}
\tableofcontents
\LARGE\hyperlink{Core1.pdf.1}{{Core 1}}\\
\LARGE\hyperlink{Core2.pdf.1}{{Core 2}}\\
\LARGE\hyperlink{Core3.pdf.1}{{Core 3}}\\
\LARGE\hyperlink{Core4.pdf.1}{{Core 4}}\
\includepdf[pages=-,link,linkfit=FitH,addtotoc={1, section, 1, Core 1, Core1}]{Core1.pdf}
\bookmark[dest=Core1.pdf.1]{Core 1}
\includepdf[pages=-,link,linkfit=FitH]{Core2.pdf}
\bookmark[dest=Core2.pdf.1]{Core 2}
\includepdf[pages=-,link,linkfit=FitH]{Core3.pdf}
\bookmark[dest=Core3.pdf.1]{Core 3}
\includepdf[pages=-,link,linkfit=FitH]{Core4.pdf}
\bookmark[dest=Core4.pdf.1]{Core 4}
\end{document}