one possibility could be:
0. remove the \tableofcontents in your tex.file
1. create a new file named "tabofcon.tex" with consist only of the line
\tableofcontents
2. include the file in your texfile by
\include{tabofcon}
at the place of your original \tableofcontents
3. compile all twice, so the pdf should be in the original shape
4. insert before\begin{document}
\includeonly{tabofcon}
then the pdf should only consists of your table of contents.
However I am not sure whether it really works with pdflatex, but with
"normal" Latex it works.
Cheers
Jörg
In case you have a main document and includes the parts by
\include{file.tex}, then by \includeonly{} you can obtain that only the
parts which are in the main document will be compiled.
main.tex
======
...
\includeonly{}
\include{chapter1}
\include{chapter2}
\include{chapter3}
\tableofcontents
When you compile this file first with the line \includeonly{} commented
and then, when the toc is created appropriately also with this line,
the resulting file will include only table of contents with the same
page numbers as in the original file.
I guess there's no difference whether you use latex or pdflatex (I've
tried this with latex only.)
Martin