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.

1 Answer 1

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .