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 :
\documentclass[11pt,a4paper]{article}
\usepackage{pdfpages}
\newcommand{\setlayout}{3}
\thispagestyle{
\lhead{#1}
\chead{#2}
\rhead{#3}
}
\begin{document}
\includepdf[pages=-,pagecommand={\setlayout{Left corner}{Center}{Right corner}}]{my file.pdf}
\end{document}
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
Best Answer
Here is a suggestion using package
fancyhdr
to define an own style for pages included by\includepdf
: