Sunday | 23 JUN 2024
[ previous ]
[ next ]

Convert PDFs to Images

Title:
Date: 2023-08-05
Tags:  sysadmin

I wrote a quick script to create pngs from pdfs so that I could quickly look at PDFs.

#!/usr/bin/bash

for i in *.pdf
do
   new_name="images/${i/%.pdf/}"
   echo $i, $new_name
   pdftoppm "$i"  "$new_name" -f 1 -png -rx 300 -ry 300
done