private string GetPageImageWithGhostScript(int pageNumber, string sessionName) { GhostScript g = new GhostScript(GhostScriptPath, _dpi); string imgFile = g.ConvertPdfToBitmap(SourcePdf, pageNumber, pageNumber, sessionName); return(imgFile); }