I want to adjust textwidth and textheight to papersize in mid document, that simple.
I am planning to change some pages paper size, but I need both the header, footer and text to adjust (better if automatically) to the paper size.
I've been playing around with geometry package and I was unable to find an option that help me.
MWE:
\documentclass{article}
\usepackage{geometry}
\usepackage{lipsum}
\usepackage{fancyhdr}
\begin{document}
\thispagestyle{fancy}
\newlength{\classpageheight} \setlength{\classpageheight}{\pdfpageheight}
\newlength{\classpagewidth} \setlength{\classpagewidth}{\pdfpagewidth}
\lipsum[1-6]
\newpage
\thispagestyle{fancy}
\eject \pdfpagewidth=17in \pdfpageheight=18in
\lipsum[1-6]
\eject \pdfpagewidth=\classpagewidth \pdfpageheight=\classpageheight
\newpage
\thispagestyle{fancy}
\lipsum[1-6]
\end{document}
Best Answer
Here is my solution your remarks are welcome