Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This is related to the post How can I superimpose LaTeX / TeX output over a PDF file?.

One of the answers is (which is the one I'm using now):

\documentclass[12pt]{article}
\usepackage{pdfpages}
\usepackage{tikz}
\begin{document}
\includepdf[pagecommand={\begin{tikzpicture}[remember picture, overlay]\node at (current page.center) {overlayed text};\end{tikzpicture}}]{filename}
\end{document}

I modified is to use absolute position:

\documentclass[12pt]{article}
\usepackage{pdfpages}
\usepackage{tikz}
\begin{document}
\includepdf[pagecommand={\begin{tikzpicture}[remember picture, overlay]\node at (0.5, 1) {overlayed text};\end{tikzpicture}}]{filename}
\end{document}

However when I tried it on a pdf document with multiple pages, only the first page of the pdf document is extracted and used for the creation of the new pdf document. The text is included the new pdf correctly.

Question: How do I make sure that the text is included on every page?

share|improve this question
add comment

1 Answer

Easy fix:

\documentclass[12pt]{article}
\usepackage{pdfpages}
\usepackage{tikz}
\begin{document}
  \includepdf[pages=-,pagecommand={\begin{tikzpicture}[remember picture, overlay]
      \node at (0.5, 1) {overlayed text};
    \end{tikzpicture}}]{filename}
\end{document}
share|improve this answer
4  
So the fix consists in adding the option pages=- to \includepdf. A little more verbosity is usually helpful. –  Speravir Sep 25 '12 at 3:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.