3

I'm using pdfpages to include some pdf files in a current document. But I'd like some of these pdf pages to have a LaTeX heading, either with a sectioning command \section*{This is how it is} or just a bold-faced line: \textbf{This is how it is}. However, pdfpaged material seems to like being on a page by itself, and even if I include a scaling factor I can't get the heading and the pdf page together. What happens is that I get the heading on a page by itself, and the pdf page on the next page.

I can get the result I want if I use includegraphics instead of includepdf but then of course I only get the first page of the pdf file included.

1 Answer 1

3

You can use the pagecommand option like this:

\includepdf[pages=1,pagecommand={\section{Second title}\label{mylabel}\hfill}]{file.pdf}
\includepdf[pages=2-,pagecommand={\hfill}]{file.pdf}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .