PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Mar 29, 2024 2:37 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat May 08, 2010 9:02 am 
Offline

Joined: Sat May 08, 2010 8:53 am
Posts: 2
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);


Top
 Profile  
Reply with quote  
PostPosted: Sat May 08, 2010 10:12 am 
Offline

Joined: Sat May 08, 2010 8:53 am
Posts: 2
For people looking for the this functionality I found this wrapper for Ghostscript which works perfectly :lol:
http://www.mattephraim.com/blog/2009/07/08/introducing-ghostscriptsharp/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 125 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group