I have an existing PDF (scanned notes from a class). I'd like to improve this basic scan as much as possible. I do not think that any OCR is good enough to recognize handwriting, so I cannot make it searchable. But I would like to manually modify it by adding a TOC in the beginning that links to parts of the document.

One way could be to split the PDF into separate documents, then have:

\section{Part One}
\include{part1.pdf}
\section{Part Two}
\include{part2.pdf}


But I am wondering if there is a way to do this without splitting it up.

-

use package pdfpages and then:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tgpagella}
\usepackage{pdfpages}
\usepackage{hyperref}

\begin{document}

\tableofcontents
\clearpage\phantomsection
\addcontentsline{toc}{section}{The first section name}% or chapter
\clearpage\phantomsection
\addcontentsline{toc}{section}{The second section name}% or chapter

 Interesting/disappointing that pdfpages' linktotoc option is harder than just doing this manually, since the rest of the package is excellent. – Will Robertson Feb 14 '11 at 21:35 @Will do you mean addtotoc? – mankoff Feb 14 '11 at 21:58 @Herbert Thank. It sort-of works. It appears correct, but the TOC links (and sidebar links) all go to the bottom of the local TeX text document. (page 2, after the TOC and title page). The TOC link says "page 17", but just jumps to the bottom of the local doc (the top of all the included pages). – mankoff Feb 14 '11 at 22:12 @mankoff: I edited the answer. There is now a working example. – Herbert Feb 14 '11 at 22:25 @mankoff — yes, sorry. My brain confused linktodoc and addtotoc. – Will Robertson Feb 14 '11 at 23:55