\documentclass{article}
\usepackage[
left=0.1cm,
right=0.1cm,
top=0.1cm,
bottom=0.1cm]
{geometry}
\begin{document}
\pdfpagewidth=2.3cm \pdfpageheight=0.7cm
\noindent $ x^n + y^n = z^n $
\newpage
\pdfpagewidth=10cm \pdfpageheight=6cm
\parbox[bottom][6cm][c]{10cm}{$ x^n + y^n = z^n $ \\ Plus some additional text.}
\end{document}
