Monthly Archives: October 2009

Convert all PDF files in a directory to PNG images

I just needed to convert several PDF vector graphics to PNG graphics. A clean way to do this is via Ghostscript (example: gs -sDEVICE=png16m -sOutputFile=tiger.png tiger.pdf). For convenience, I made a Python script that converts PDF files to PNG files via Ghostscript. I use it under Linux and Windows. Continue reading