function template(rpt)

% If compiling, make the DOM compilable
makeDOMCompilable()

%% Intestazione e pič di pagina
import mlreportgen.dom.*
import mlreportgen.report.*

wmPAG = Watermark('sfondoPAG.png');

% Construct the header
header = PDFPageHeader();
footer = PDFPageFooter();

rpt.Layout.Watermark = wmPAG;

end
