[Tex/LaTex] Move/offset image

graphicspositioning

I am trying to get a pdf with \includepdf, but it doesn't appear on the first page. I have tried all the possible options. Anyways, now I'm trying to insert the PDF using \includegraphics, but the PDF looks far from the chapter name. Is there any way to move the image closer to the upper margin?

enter image description here

Is it possible to move an image closer to the margin?

Best Answer

In the default chapters of report and book, the space below each chapter heading is 40pt. You can remove this to place the image as close to the header as you need:

enter image description here

\documentclass{report}

\usepackage{graphicx}

\begin{document}

\chapter*{First chapter}

\vspace{-40pt}

\noindent
\includegraphics[width=\linewidth]{example-image}

\chapter{Second chapter}

\vspace{-40pt}

\noindent
\includegraphics[width=\linewidth]{example-image}

\end{document}

Using length calculations, you can place the image a distance X from the header using

\vspace{\dimexpr-40pt+X}
Related Question