I have around 50 images of hand written notes like the one below. I want to merge them together in a PDF. How can I do that, so that each Image is distributed over many pages, while keeping its size? So, it should not be a document with 50 gigantic pages but instead one document with the necessary amount of pages with standard size.
Asked
Active
Viewed 80 times
1 Answers
2
you can modify the textheight by setting the margins:
\documentclass{article}
\usepackage[a4paper,tmargin=1cm,bmargin=1cm,includeheadfoot]{geometry}
\usepackage{graphicx,multido}
\parindent=0pt
\newsavebox\IBox \sbox\IBox{\includegraphics{/tmp/V43SK}}
\begin{document}
\offinterlineskip
\multido{\iA=0+1,\iB=1+1}{9}{%
\includegraphics[
trim=0 \dimexpr\ht\IBox-\iB\textheight\relax{} 0 \iA\textheight,
clip,width=\textwidth]{/tmp/V43SK}\newline}
\end{document}
user187802
- 16,850
-
-
\ht\IBoxis the height and divided by\textheightthe number of pages – user187802 Jul 14 '20 at 16:07




\includegraphicscommands have option to clip the output of the images without touching the source images, but you will finish before splitting up the source images (with Gimp, for instance) to pieces of width to height ratio similar to A4 pages, and then include each image as is, setting only the width or height. – Fran Jul 12 '20 at 19:27