# Margins and header/footer like in Word

I have template in MS Word with image in header/footer. Image width is equal to width of page, left and right margins have 2 cm. I don't know how to do this in latex...

Here you have preview how it's looks in Word. Blue is total header margin, yellow is image

In a similar way is built footer.

• I'm using geometry package, and I don't have problem with left/right margins. Problem is with header and image that I must put on the whole page width Dec 8, 2016 at 7:28
• Should the header image be displayed on every page or just the first page? What's the page size, by the way: A4, US letter or legal, or something else? Does the header image really consist of a wide yellow bar?
– Mico
Dec 8, 2016 at 7:30
• a4paper. Image must be displayed on every page. And yes, image is on whole page width, from left to right. Dec 8, 2016 at 7:35
• I have had a similar issue in the past and tried using fancyhead with the margins adjusted in the includeimage command but could never get it to sit nicely. It might work for you though. Dec 8, 2016 at 8:11

You could load package scrlayer-scrpage and declare additional layers for the pictures at the top and the bottom of the page. Then these layers can be added to all page styles.

\documentclass[a4paper]{article}
\usepackage[
hmargin=2cm,
vmargin=4cm,
footskip=2em% adjust the vertical position of the footer entry (e.g. page number)
]{geometry}
\usepackage{graphicx}

\usepackage[
automark,% if you want to use section entries in the header/footer
headwidth=paper,% if the header entries should also use the whole page width
]{scrlayer-scrpage}
\DeclareNewLayer[
background,
topmargin,
mode=picture,
contents=\putUL{\raisebox{-\height}{\includegraphics[width=\layerwidth,height=2.5cm]{example-image-A}}}
]{topmargin}
\DeclareNewLayer[
background,
bottommargin,
mode=picture,
contents=\putLL{\includegraphics[width=\layerwidth,height=2.5cm]{example-image-B}}
]{bottommargin}