I have a set of pdf files (without the latex source) which I merged into a larger pdf file. Each individual pdf file is an article with sections. I created a set of bookmarks for the larger pdf which point to each of the sections in each of the constituent smaller pdf files using the bookmarks package.
\bookmark[level=2,page=6,view={FitH 842}]{<Section>}
\bookmark[level=3,page=6,view={FitH \calc{\paperheight-\topmargin-8in} null}]{<Subsection1>}
\bookmark[level=3,page=8,view={FitH \calc{\paperheight-\topmargin-7in} null}]{<Subsection2>}
\bookmark[level=3,page=11,view={FitH \calc{\paperheight-\topmargin-2in} null}]{<Subsection3>}
\bookmark[level=3,page=13,view={FitH \calc{\paperheight-\topmargin-7in} null}]{<Subsection4>}
Unfortunately I could not use these bookmarks to create the ToC. To create the ToC I did the following
\tableofcontents
\clearpage\phantomsection
\addcontentsline{toc}{chapter}{<Chaptername N>}
\includepdf[pages=-,linktodoc=false]{<file N>.pdf}
\clearpage\phantomsection
\addcontentsline{toc}{chapter}{<Chaptername N+1>}
\includepdf[pages=-,linktodoc=false]{<file N+1>.pdf}
The issue I am facing now is that the contents of the ToC are being added (prepended) to the bookmarks data containing the the bookmarks I had manually added.
My question is: How can I keep the ToC contents from being added to the bookmarks?
More info:
The ToC data comes before the bookmarks data (the bookmark commands refer to page numbers of the fully merged pdf file). The file structure is as follows:
<ToC data>
\bookmarksetup{startatroot}
\bookmarks ...
I need to add the bookmarks because I cannot add the sections of each individual pdf file to the ToC (since I do not have the LaTeX sources)
The reason I want a separate contents page at the very beginning is because some lightweight pdf readers (such as the google chrome's native pdf reader) do not utilize bookmarks)
This is a continuation of the question I had previously asked at How do I use LaTeX to create a table of contents for a set of pdf files which I am merging into a single large pdf?