Latex Image 页眉和页脚

Latex Image headers and footers

我正在尝试在 LaTex 中制作一个机构页面,该页面必须有我的机构提供的页眉和页脚,并且不能更改,所以我正在尝试用我的下一个代码强制他们从这里借来的https://tex.stackexchange.com/questions/297240/adding-an-image-to-a-header-in-latex

\documentclass[12pt,letterpaper]{article}


\usepackage{fancyhdr}
\usepackage[left=4cm,top=4cm,right=3cm,bottom=3cm,headheight=3.8cm]{geometry}

\pagestyle{fancy}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tikzpagenodes}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}


\fancyfoot[R]{\begin{tikzpicture}[remember picture,overlay]
\draw  let \p1=($(current page footer area.north)-(current page.south)$),
      \n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,below right] 
      at (current page.south west){\includegraphics[width=\paperwidth,height=\n1]{exampleH}};
\end{tikzpicture}}


\fancyhead[L]{\begin{tikzpicture}[remember picture,overlay]
\draw  let \p1=($(current page.north)-(current page header area.south)$),
      \n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,below right] 
      at (current page.north west){\includegraphics[width=\paperwidth,height=\n1]{ExampleF}};
\end{tikzpicture}}





\begin{document}
\section{First section}
Type your document as usual!
\newpage
\section{Second section}
Type your document as usual!
\end{document}

问题是您将页脚图像放在了页面底部边框的下方。如果将节点放在下边界上方,您会看到它:

\documentclass[12pt,letterpaper]{article}


\usepackage{fancyhdr}
\usepackage[left=4cm,top=4cm,right=3cm,bottom=3cm,headheight=3.8cm]{geometry}

\pagestyle{fancy}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tikzpagenodes}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}



\fancyfoot[R]{\begin{tikzpicture}[remember picture,overlay]
\draw  let \p1=($(current page footer area.north)-(current page.south)$),
      \n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,above right] 
      at (current page.south west){\includegraphics[width=\paperwidth,height=\n1]{example-image-duck}};
\end{tikzpicture}}

\fancyhead[L]{\begin{tikzpicture}[remember picture,overlay]
\draw  let \p1=($(current page.north)-(current page header area.south)$),
      \n1={veclen(\x1,\y1)} in
node [inner sep=0,outer sep=0,below right] 
      at (current page.north west){\includegraphics[width=\paperwidth,height=\n1]{example-image-duck}};
\end{tikzpicture}}





\begin{document}
\section{First section}
Type your document as usual!
\newpage
\section{Second section}
Type your document as usual!
\end{document}