Exporting a .png from a .pdf File

I wanted to automate capturing page 1 of my PDF-based resume as a PNG file. I found out that I could accomplish the task with a tool called ghostscript.

Ghostscript is an interpreter for PostScript and Portable Document Format (PDF) files. It is available both under the GNU GPL Affero license and for commercial licensing from Artifex. It has been under active development for over 20 years and has been ported to many different systems during this time.

Export page 1 to .png

> brew install gs
> gs -dNOPAUSE -dBATCH \
-sDEVICE=png16m \
-dFirstPage=1 \
-dLastPage=1 \
-sOutputFile=resume.png resume.pdf




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Wil (₩) Moore III

Wil (₩) Moore III

Technical Writer, Software Engineer Specializing in NodeJS, TypeScript, React & React Native, SQL, DevOps, AWS, Azure, & ElasticSearch. Author of selectn.js.