Basic API for ProcessDocument; added ghostscript;