I'm trying to customize header and footer while inserting a pdf using a hand-made command: \setlayout (3 parameters)

\includepdf[pagecommand={\setlayout{Left corner}{Center}{Right corner}}]{my file.pdf}

First I tried :



\includepdf[pages=-,pagecommand={\setlayout{Left corner}{Center}{Right corner}}]{my file.pdf}

But, of course, it did not work.

So I would like to create a flexible (as I am going to use it several times) \setlayout command in order to customize header and footer only where the pdf is displayed

  • 2
    Welcome to TeX.SE! Please make your code snippets compilable ... – Mensch Jun 15 '17 at 19:50

Here is a suggestion using package fancyhdr to define an own style for pages included by \includepdf:

\setlength\headheight{13.6pt}% as suggested by fancyhdr
\usepackage{mwe}% only for dummy text and example pdf page
\fancyhead[C]{normal pages}



  pagecommand=\setlayout{Left corner}{Center}{Right corner},

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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