1

I am generating quite a large document in LaTeX. I probably should have used something different, but that is too late now. In this document I include many images via \includegraphics, mainly .jpg-files. Some of them have a much higher resolution than needed for printing for their size (A 4).

So my question is whether there is a way to force all included jp and png files to be 300DPI? I need that to reduce my file size but it seems very hard if not possible because DPI is of course dependant on the size and scaling of the included image

  • Basically the same question: https://tex.stackexchange.com/questions/73444/can-pdflatex-or-any-tex-package-automatically-rescale-included-images-which-ha For JPG files one of the answers there mentions the degrade package. Note that the package requires you to also have ImageMagick installed, and relies on Unix shell-scripts. – Willie Wong Jun 09 '22 at 03:24
  • That said, if you have already access to ImageMagick, you could just downsample all of your graphics files. Reasonably on an A4 piece of paper, if you want 300 DPI your images should be no more than 2000 pixels wide. – Willie Wong Jun 09 '22 at 03:30
  • Maybe are you using the scale option? In this case, of course, resampling the images will organize a nice mess in the LaTeX output, so is always better to use width or height, or both but with keepaspectratio also, so you can resample the images without change the final size in the LaTeX output. – Fran Jun 10 '22 at 13:15

0 Answers0