After making a ton of screenshots I needed to make a single PDF file. Here’s how to do it on a MacOS.
- Firstly, move all of your PNG images into one directory
- Then optimize these images using
pngquant:
for file in *.png; do
pngquant --force --ext .png "$file"
done
- Convert optimized images into a PDF file using
imagemagick:
convert *.png merged.pdf
That’s it!