How to link to sibling PDF when using pdfpages and hyperref

I am using pdfpages to tie several PDF documents together (yes, they must be separate documents) into a portfolio. My problem is that I need to place many, many links within one child document that link to the first page of other child documents (which are bookmarked in the outer document). Here is an MWE:

**ChildOne.tex:**

\documentclass{article}

\usepackage[bookmarksopenlevel=1,%
pdfpagemode=UseOutlines]{hyperref}
\hypersetup{
pdfinfo={
Title={Child One},
Author={Me}
}
}

\author{Me}
\title{Child One}

\begin{document}
\maketitle
Here is where I want to refer to Child Two.

I can do it by \href[page=3]{OuterDoc.pdf}{absolute page reference},
but the zoom level changes, and I don't always know the absolute
page number ahead of time (because there are so many child documents
of varying lengths).

My preference would be to refer to Child Two automatically, and
\href{OuterDoc.pdf#nameddest=ChildTwo}{a named destination} doesn't
seem to work.

\end{document}


**ChildTwo.tex:**

\documentclass{article}

\usepackage{lipsum}

\usepackage[bookmarksopenlevel=1,%
pdfpagemode=UseOutlines]{hyperref}
\hypersetup{
pdfinfo={
Title={Child Two},
Author={Me}
}
}

\author{Me}
\title{Child Two}

\begin{document}
\maketitle
\lipsum[1-5]
\end{document}


After compiling ChildOne.tex and ChildTwo.tex, I run pax on ChildOne.pdf (using the information in this question), and then compile OuterDoc.tex.

**OuterDoc.tex:**

\documentclass{article}

\author{Me}
\title{Big Title}

\usepackage{pdfpages}

\newcommand{\singlepageinpdf}{1}
\newcommand{\pagesinpdf}{1}

\newcounter{includepdfpage}
\newcounter{currentpagecounter}
\refstepcounter{includepdfpage}%
\stepcounter{currentpagecounter}%
\label{#1.\thecurrentpagecounter}}
\newcommand{\modifiedincludepdf}[4]{%
\setcounter{currentpagecounter}{0}%
\pdfximage{#4}%
\renewcommand{\pagesinpdf}{\the\pdflastximagepages}%
\if\pagesinpdf\singlepageinpdf%
\relax%
\else%
\fi%
}

\usepackage{pax}

\usepackage[bookmarksopenlevel=1,%
pdfpagemode=UseOutlines,%
pdfpagelayout=OneColumn,%
pdfnewwindow=false,%
pdfstartview=FitH]{hyperref}
\hypersetup{
pdfinfo={%
Title={Outer Doc},%
Author={Me}%
}%
}

\usepackage{bookmark}

\begin{document}
\bookmark[page=1, level=0]{Title Page}
{\begin{center}
\Huge \textbf{My Big Document}
\end{center}
}

\modifiedincludepdf{0}{First Child}{ChildOne}{ChildOne.pdf}
\modifiedincludepdf{0}{Second Child}{ChildTwo}{ChildTwo.pdf}

\end{document}


Because my \href[page=3]{OuterDoc.pdf}{absolute page reference} link works correctly, it looks to me like the linking system, including pax, is working as expected. However, \href{OuterDoc.pdf#nameddest=ChildTwo}{a named destination} doesn't give me any joy.

Am I possibly out of luck because a bookmark is not a valid destination?? (And if so, what brilliant person out there can think of a workaround?)

An additional (but small) problem is that the pdfstartview=FitH option of hyperref (2012/11/06 v6.83m) doesn't load the page in fitted width (for the [page=3] link) -- it zooms to the whole-page view.

-

• In OuterDoc.tex, create the named destination by adding \hypertarget{#3}{} to the pagecommand key in \modifiedincludepdf. (I haven't bothered pasting the whole file with just that one change.)

• Linking to the named destination with \hyperref{OuterDoc.pdf}{}{ChildTwo}{a named destination} seems to work.

• For the last small problem you mentioned, add pdfremotestartview=FitH \hypercalcbp{\paperheight-\topmargin-1in -\headheight-\headsep} key to \href. (Gets the correct place if all pages in ChildTwo have same paper size and margins as those containing the link, ie ChildOne.)

ChildOne.tex

\documentclass{article}

\usepackage[bookmarksopenlevel=1,%
pdfpagemode=UseOutlines]{hyperref}
\hypersetup{
pdfinfo={
Title={Child One},
Author={Me}
}
}

\author{Me}
\title{Child One}

\begin{document}
\maketitle
Here is where I want to refer to Child Two.

I can do it by \href[page=3,pdfremotestartview=FitH \hypercalcbp{\paperheight-\topmargin-1in