I know that this type of question have been asked before, but I havent been able to find a clear answer and alot of the posts are 4 years old.
I would like to convert a PDF to multiple JPG images, 1 image for each page in the PDF.
I have read that you need to use Ghostscript, but the UseGhostscript sample I downloaded says I need the dll file gsdll32 and I cant find it anywhere on the ghostscript site. I even downloaded the exe installer and installed it, but still it didnt work. I dont wanna have to install ghostscript on the server where I wanna run this so I am looking for a way to do this conversion and have the dll added as an assembly.
I was hoping someone could shed some light on how I get this funktionality? I was hoping it was somthing PDFsharp could do, since it can extract images from a PDF and convert a PDF into multiple PDF documents.
Edit: I have now gotten the UseGhostscript sample code to work, but when I move it to my own project which doesnt run Windows Forms, but is a web application, then I get a BadImageFormatException exception.
All I do is: GS gs = new GS();
System.Drawing.Image image = gs.PdfToPng(filename, 4, 96);
But I get an error in ghostscript at: result = Api.gsapi_new_instance(ref GS.instance, IntPtr.Zero);
|