# How to set the new margin on the next page?

I have a large footer that needs to be placed on the first page of a document. To make it fit, I've used the geometry package and increased the bottom margin.

For the header/footer manipulation, I'm using fancyhdr. How do I use \newgeometry{bottom=2cm} again on the 2nd page of the text, without using \newpage and guessing where in the text the second page starts?

Can LaTex execute commands on next page? Something like

\NextPageExecute{\newgeometry{bottom=3cm}}

would solve the problem. Here is the MWE:

\documentclass{article}

\usepackage{xcolor}
\usepackage{lipsum}

\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}

% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
\pagestyle{fancy}

% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
% Fancy pagestyle for the rest of the document.
\pagestyle{fancy}
% Remove the horizontal line from the header.
% Remove everything from the footline.
\cfoot{}

\definecolor{CUSTOM}{HTML}{00529e}

% Set the header and footer style.
\fancypagestyle{empty}{%
\lfoot{
Something something. \\
Memo text. \\
Telephone numbers. \\
}
\rfoot{
\textcolor{CUSTOM}{\Huge{HUGE TEXT}}
}
}

\begin{document}

\thispagestyle{empty}

\lipsum

\lipsum

\lipsum

\end{document}.


The first page looks like this:

And the second page has this unnecessarily large footer space:

The afterpage package does exactly what you are looking for. Seen as you only want the 3cm bottom margin on the first page and (for example) 2cm elsewhere, I would recommend having the default layout with 2cm and using \newgeometry on the first page only (followed by a \restoregeometry\clearpage in \afterpage):

\documentclass{article}

\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{afterpage}

\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}% 2cm bottom (usual)

% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
\pagestyle{fancy}

% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
% Fancy pagestyle for the rest of the document.
\pagestyle{fancy}
% Remove the horizontal line from the header.
% Remove everything from the footline.
\cfoot{}

\definecolor{CUSTOM}{HTML}{00529e}

% Set the header and footer style.
\fancypagestyle{empty}{%
\lfoot{
Something something. \\
Memo text. \\
Telephone numbers. \\
}
\rfoot{
\textcolor{CUSTOM}{\Huge{HUGE TEXT}}
}
}

\begin{document}
\newgeometry{left=2cm,right=2cm,top=2cm,bottom=3cm} % Change to 3cm bottom (temp)
\thispagestyle{empty}
\afterpage{\restoregeometry\clearpage}
% CONTENT HERE

\lipsum

\lipsum

\lipsum

\end{document}


Page 1:

Page 2: