# Can I add tikzpictures to pages included with pdfpages

I would like to decorate pages of some pdf documents with tikzpictures. My idea was to include them with pdfpages, and then draw a tikzpicture overlay on top of the page.

\documentclass[12pt]{article}

\usepackage{pdfpages}
\usepackage{tikz}
\begin{document}

\includepdf[pages=1]{someinputpdf}
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.center) {test};
\end{tikzpicture}

\end{document}


However, tikzpicture ends up at page 2 of the resulting document. Is there a way to achieve similar functionality?

-

You could use the pagecommand option, such as
\includepdf[pagecommand={\begin{tikzpicture}...\end{tikzpicture}}]{filename}

Very nice. Can this option be set globally for all \includepdf calls? – Martin Scharrer Mar 7 '11 at 10:32
@ipavlic: What exactly doesn't work? It works fine in my test with [remember picture, overlay] but not without. – Martin Scharrer Mar 7 '11 at 10:47
To answer my own question: \setkeys{pdfpages}{<options>} makes the options global, like with graphicx. – Martin Scharrer Mar 7 '11 at 10:48