GeneralImages to PDF

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
AndyTex
Posts: 1
Joined: Sun Jan 28, 2024 8:13 pm

Images to PDF

Post by AndyTex »

Hi everyone,

I have multiple jpg files and I want to create a PDF with one image per page without any margin. Until now I used something like this and was enough because all images were the same size.

Code: Select all

\documentclass{article}
\usepackage[margin=0pt,paperheight=800mm,paperwidth=600mm]{geometry}
\usepackage{pdfpages}
\parindent=0pt
\pagestyle{empty}
\begin{document}
  \includepdf{Page_001.jpg}
  \includepdf{Page_002.jpg}
  \includepdf{Page_003.jpg}
  \includepdf{Page_004.jpg}
  \includepdf{Page_005.jpg}
  ...
\end{document}
Now I have pictures with different sizes and I want to create a PDF with pages of different sizes according to each image size. Any idea how I can make this? Is there any way to set margin, width and height for \includepdf?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply