17
4
I have a set of images stored as separate PDF files. One image per file. Each image takes up one PDF page.
I need to re-scale all of these images, preferably at the command line, so that the image content and the page dimensions of the PDFs are both scaled relative to their original sizes/dimensions. For example: scale all the images by 50% should shrink the size of the image and the dimensions of the page.
Already tried:
- pdfpages + latex: will re-scale the image but dimensions of the pages stay the same.
- pdfjam: same problem; can re-scale but page dimensions want to be letterpaper or a4.
- convert (imagemagick): converts to raster, which I don't want.
- ghostscript: seems to scale based on absolute new page size, and I need relative page size.
I know one of these must work. I can't figure out where I've gone wrong. I'm on Mac but a Linux solution would work just as well.
1Yes thanks. I use
cpdf -scale-to-fit "210mm 210mm" in.pdf -o out.pdf
and it works great – maxbellec – 2017-02-22T10:25:16.8902
could not find
– cardamom – 2017-08-28T11:15:34.483cpdf
in ubuntu repos but for mepdfjam
as per this answer did the trick.I used
– olivieradam666 – 2018-06-12T08:49:19.147pdfposter
as per this answer.Thanks, this is a magical tool! – Autodidact – 2019-07-20T21:24:00.143