# Pdfbookmark with number

I'm importing some pdf files, to my document.

\pdfbookmark{First}{r01}

\includepdf[pages=-,pagecommand={}]{inc/r01.pdf}

\pdfbookmark{Second}{r02}
\includepdf[pages=-,pagecommand={}]{inc/r02.pdf}

These are book chapters, with their own formatting - it's a reason, why I can't use \section there.

I don't want to have any table of contents in my document, just the chapters names in the bookmarks area together with the numbering. How to do this?

-

Using the hyperref package, your code should work to produce the bookmarks. Alternatively, the smaller bookmark package provides the same interface for just PDF bookmarks. Remember that you need to compile your document at least twice in order for the PDF bookmarks to be accurate.

\documentclass{article}
\usepackage{pdfpages}% http://ctan.org/pkg/pdfpages
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
%\usepackage{bookmark}% http://ctan.org/pkg/bookmark
\begin{document}
% file.pdf contains 8 pages of \lipsum[1-40] in article document class
\pdfbookmark{1 First}{r01}
\includepdf[pages=1-2]{file.pdf}

\pdfbookmark{2 Second}{r02}
\includepdf[pages=3-4]{file.pdf}

\pdfbookmark{3 Third}{r03}
\includepdf[pages=5-6]{file.pdf}

\pdfbookmark{4 Fourth}{r04}
\includepdf[pages=7-8]{file.pdf}

\end{document}

-