Re: Immagine di sfondo per tutte le pagine

#28606
Up
0
Down
::


Salve.

Ho provato a usare \Sfondi come si vede nel codice seguente

`\documentclass[a4paper,11pt,openright]{report}
% imposta i margini in base alla carta intestata
\usepackage[twoside,%
bindingoffset=5mm,%
top=4.5cm,%
bottom=3.55cm,%
left=2.8cm,%
right=3cm,%
heightrounded]%
{geometry}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}
\usepackage[pdftex]{graphicx}
\usepackage{eso-pic}
\usepackage{everyshi}
\usepackage{lipsum}

\begin{document}
\makeatletter
\newcommand{\Sfondi}[2]{%
\ifodd\value{page}\@Sfondi{#1}\else\@Sfondi{#2}\fi
\EveryShipout{\ClearShipoutPicture
\ifodd\value{page}\@Sfondi{#2}\else\@Sfondi{#1}\fi}}
\def\@Sfondi#1{\AddToShipoutPicture*{\AtPageCenter{%
\makebox(0,0){\includegraphics[width=\paperwidth, height=\paperheight]{#1}}}}}
\makeatother
\author{Nome Cognome}
\title{Prova report}
\maketitle
\Sfondi{provbs_L1.pdf}{provbs_R1.pdf}
\tableofcontents
\newpage
\section{Intro}
\lipsum[1]
\subsection{Sub1}
\lipsum[6-7]
\subsection{Sub2}
\lipsum[9-10]
\section{Sec1}
\lipsum[9-10]
\section{Sec2}
\lipsum[16]
\subsection{End}
\lipsum[17-19]
\end{document}
`

ma il PDF che si ottiene presenta a pagina 2 le due immagini di sfondo sovrapposte mentre da pagina 3 in poi la sistemazione è corretta. Che cosa sbaglio?

Grazie e buona giornata,
Michele

Go to top