Export PDFs to PNGs

Ever want to convert a Google Slides presentation to images without having to save each one manually?

  1. Export from Google Slides to PDF. File > Download > PDF This will let us download all the images at once.
  2. Using the imagemagickBig nix package or installing with instructions from here you can then run the following command in the CLI:

convert -density 300 -quality 100 my-download.{pdf,png}

This will then convert the PDF to a series of images at 300 DPI.

fish shell script for quick access: pdf-to-png ./my-pdf-file.pdf

function pdf-to-png
    if test (count $argv) -lt 1
        echo "pdf-to-png <filename>"
        return 1
    end

    set fileName (echo $argv | sed 's/.pdf//')

    echo convert --run "convert -density 300 -quality 100 $filename.{pdf,png}"
    convert -density 300 -quality 100 $fileName.{pdf,png} && ls *.png
end
Author Avatar

Matt Carrier

I am a pixel connoisseur who enjoys the finer details of a Bresenham line. When not staring at arrays of smoothly rendered pixels I enjoy playing guitar and consuming coffee.