2

I am currently working with Texmaker trying to add a png that is 2000x1800 px in size as an entire page into my document, which has an A4 format set. I do not want to have a margin on any pageside for the picture page (since i do not wish to print my document).

In other words i want my picture to cover an entire page which also has a custom size without affecting the other, usual A4 pages of the document.

Compilation up until now was done with PDFLatex.

The closest solution to my desired result was achieved by resizing the pdfwidth and height at the corresponding place and using incgraph to get the entire custom page to portray the picture:

\eject \pdfpagewidth=20in \pdfpageheight=18in followed up by \incgraph[ overlay={\node[red] at (page.center) {\Huge};} ]{The Mentioned 2000x1800picture.png} However every following page is hence also gigantic though only displaying text.

Trying to resize it to A4 by using \eject \pdfpagewidth=8.27in \pdfpageheight=11.69in resizes every single page (even the picture page) to A4.

Is there a way to resize the FOLLOWING pages to A4 again or ist the entire approach "wrong"? If so is there another way to create a custom page mid document which marginlessly displays one huge picture and does not affect the rest of the document at all?

Thank you for every answer!

  • 1
    it is possible to change the page size inside a document (https://tex.stackexchange.com/questions/6834/change-paper-size-in-mid-document). Conversely, PDF maintains the original resolution of images and can be zoomed in to that limit. It is also possible to split an image over two pages (https://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right). – John Kormylo Apr 25 '21 at 16:13

2 Answers2

3

Using the package geometry it is possible to use the entire page to insert an image from edge to edge of the page and later restore the original geometry for the rest of the document.

a

This is the code.

\documentclass[12pt,a4paper]{article}

\usepackage{graphicx} \usepackage[left=3.00cm, right=3.00cm, top=3.00cm, bottom=3.00cm]{geometry}

\usepackage{kantlipsum} % dummy text

\begin{document}

  1. \kant[1]

\begin{figure}[h] \centering \includegraphics[width=0.8\linewidth]{example-grid-100x100pt} \caption{This is the original figure}
\end{figure}

\clearpage

\thispagestyle{empty} % no page number here \newgeometry{left=0mm, right=0mm, top=0mm, bottom=0mm} % use full page

\begin{figure}[p] % [p] Place it on a page containing only floats \includegraphics[width=\pagewidth, height=\pageheight]{example-grid-100x100pt} \end{figure} \restoregeometry % revert to the original geometry from now on

  1. \kant[2]

\end{document}

Simon Dispa
  • 39,141
0

you can use the lscape package. open a new page, use lscape and finish with a new page.

\usepackage{lscape}

.....

\newpage \begin{lscape}

.....<put your pictue here>

\end{lscape} \newpage

.....

the result I got:

enter image description here

CrocoDuck
  • 3,875