[pdftex] pdfbookmarks, wrong pagenumber

baar at el.utwente.nl baar at el.utwente.nl
Fri Nov 1 18:57:11 CET 2002


Hi pdftex-users,

Adding a pdfbookmark using

\tableofcontents
\pdfbookmark[1]{contents}{c}
\label{c}

results in a bookmark with a link to the last page of the toc i.s.o. the first
page.

\pdfbookmark[1]{contents}{c}
\label{c}
\tableofcontents

results in a bookmark one page earlier than the first page of the toc.

How can I manage it to point to the first page of the toc?

Another question (off-topic).
Using pdfpages I want to include a dummy pdf-file, containing several pages.

echo %%Creator John >presentation_f.ps
echo %%BoundingBox: 0 0 800 600 >>presentation_f.ps
echo 1 1 20 {showpage} for >>presentation_f.ps

generates a very simple postscript file. Gv does not show the pagenumbers.
Via epstopdf an "empty" pdf document with pagenumbers will be generated.

Under pdftex0.14 the inclusion runs fine.
Under 1.00a-pretest the following error is obtained: "Error: pdflatex
 (file ./presentation_f.pdf): pdf inclusion: invalid page contents type <null>"

Has the inclusion of pdf-files been changed?

Now I use:
                echo \\documentclass{article} >tmp.tex
                echo \\usepackage{ifthen} >>tmp.tex
                echo \\begin{document} >>tmp.tex
                echo \\newcounter{counter} >>tmp.tex
                echo \\setcounter{counter}{1} >>tmp.tex
                echo \\whiledo{\\value{counter}\<20}{\\newpage >>tmp.tex
                echo \\phantom{x}>>tmp.tex
                echo \\addtocounter{counter}{1}} >>tmp.tex
                echo \\end{document} >>tmp.tex

But that is less elegant.

Thanks in advance,

John




More information about the pdftex mailing list