Script to convert PDF to JPG using Ghostscript library