Here is an example which creates a 1 page document in which the text area is filled by a suitably scaled A4 image.
I use width=\textwidth, height=\textheight, keepaspectratio
. This means that the image will be as large as it can be subject to three constraints:
- width not to exceed
\textwidth
,
- height not to exceed
\textheight
- image not be be distorted i.e. the width and height will be scaled by the same factor if they require scaling.

\documentclass[a4paper]{article}
\usepackage{graphicx,geometry}
\begin{document}
\noindent\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{example-image-a4}
\end{document}
If you really want to use the entire page, rather than just the area reserved for the text block, you need a different approach:
\documentclass[a4paper]{article}
\usepackage{graphicx,geometry,kantlipsum}
\begin{document}
\newgeometry{scale=1}%
\noindent\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{enfys}\thispagestyle{empty}
\restoregeometry
\kant[1-3]
\end{document}
This produces the following two pages of output shown as a double-page spread (but with the odd page on the left):

\vspace
. start with\vspace*{-1\baselineskip)
and increase the value gradually until the graphic stays on that page. then you could "compensate" by splitting the negative space between the top and bottom of the page.\includegraphics[height=\textheight]{picture.jpg}
as you can not set both sizes. If the aspect ratio is different to\textwidth
/\textheight
, your image will become too big for the page.\noindent
as currently you are starting a paragraph with the image so it is indented by\parindent
so you do not have\textwidth
space\vspace*{-something}
tex is trying to put the baseline of the image\topskip
below the top of the page