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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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.