0

I sometimes use LaTeX in conjunction with pdfpages package to manipulate the pages of a PDF file (not necessarily created by LaTeX), operations like combining several pages into one, or changing the order of pages.

The question I have is how to find the size of each page in an external PDF file? I want to use pdfpages to reorder the pages by height.

3

There are probably much easier ways to do this, but you could use \settoheight to measure the height of a page:

\documentclass{article}

\newlength{\imageheight}

\usepackage{graphicx}

\usepackage{printlen} % only for demonstration

\begin{document}

\settoheight{\imageheight}{\includegraphics[page=1]{example-image-a4}}


\uselengthunit{cm}\printlength{\imageheight} % only for demonstration
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.