forgot to mention how to convert pdf to png
incorporated option to give pdf and png output