pdf to jpeg

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a way to convert just the first page of a pdf document to a jpeg
using C# so I can thumbnail these out is there something free that will allow
me to complete this task?
 
smilly said:
I need a way to convert just the first page of a pdf document to a jpeg
using C# so I can thumbnail these out is there something free that will
allow
me to complete this task?

I think you should use GhostScript GPL/AFPL (or its libraries).

From command line it will go like this:

gswin32c.exe -q -dBATCH -dMaxBitmap=300000000 -dNOPAUSE -dSAFER -sDEVICE=jpeg
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dFirstPage=1 -dLastPage=1 -sOutputFile="C:\test.jpg"
"C:\test.pdf" -c quit

RGDS PSG
 
I can get this working under a console application perfectly but , when I
addit to my asp.net application nothing copies to the clipboard I think it
has something to do with the application being in MTA HOW CAN I SET THIS TO
STA?

I am using
System.Threading.Thread.CurrentThread.ApartmentState=System.Threading.ApartmentState.STA;
and it remains to be MTA after I set this property can someone help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top