19

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?

ipavlic
  • 8,091

1 Answers1

28

You could use the pagecommand option, such as

\includepdf[pagecommand={\begin{tikzpicture}...\end{tikzpicture}}]{filename}
Stefan Kottwitz
  • 231,401