https://www.c-sharpcorner.com/blogs/convert-pdf-file-into-image-filepngjpgjpeg-using-ghostscript
GhostscriptPngDevice img = new GhostscriptPngDevice(GhostscriptPngDeviceType.Png16m);
img.GraphicsAlphaBits = GhostscriptImageDeviceAlphaBits.V_4;
img.TextAlphaBits = GhostscriptImageDeviceAlphaBits.V_4;
img.ResolutionXY = new GhostscriptImageDeviceResolution(200, 200);
img.InputFiles.Add(fileNameResultDirectory);
//img.Pdf.FirstPage = 1;
//img.Pdf.LastPage = 1;
img.PostScript = string.Empty;
img.OutputPath = @"C:\Users\name\Desktop\images\Result";
img.Process();
}
I get this error: Ghostscript.NET.GhostscriptAPICallException: 'An error occured when call to 'gsapi_init_with_args' is made: -100'
My PDF has more than page.