469,271 Members | 1,785 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

pdf to jpeg

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?
Nov 17 '05 #1
7 27136
psg
"smilly" <sm****@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
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
Nov 17 '05 #2
psg
"smilly" <sm****@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
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
Nov 17 '05 #3
psg
"psg" <pg******@ki.net.pl> wrote in message news:d2**********@ck1a.nni.pl...
I think you should use GhostScript GPL/AFPL (or its libraries).


of course URL is:
http://www.ghostscript.com/

RGDS PSG
Nov 17 '05 #4
psg
"psg" <pg******@ki.net.pl> wrote in message news:d2**********@ck1a.nni.pl...
I think you should use GhostScript GPL/AFPL (or its libraries).


of course URL is:
http://www.ghostscript.com/

RGDS PSG
Nov 17 '05 #5
hi,

http://www.codeproject.com/dotnet/pdfthumbnail.asp

this is exactly what you need.
smilly schrieb:
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?

Nov 17 '05 #6
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.ApartmentSta te=System.Threading.ApartmentState.STA;
and it remains to be MTA after I set this property can someone help?

"Bernd" wrote:
hi,

http://www.codeproject.com/dotnet/pdfthumbnail.asp

this is exactly what you need.
smilly schrieb:
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?

Nov 17 '05 #7
I got it all figured out so don't reply back and thanx for the help

"smilly" wrote:
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.ApartmentSta te=System.Threading.ApartmentState.STA;
and it remains to be MTA after I set this property can someone help?

"Bernd" wrote:
hi,

http://www.codeproject.com/dotnet/pdfthumbnail.asp

this is exactly what you need.
smilly schrieb:
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?

Nov 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Ming | last post: by
3 posts views Thread by Steve Holden | last post: by
16 posts views Thread by David Lauberts | last post: by
10 posts views Thread by rtilley | last post: by
reply views Thread by Jack Wu | last post: by
1 post views Thread by Smokey Grindel | last post: by
1 post views Thread by Joe Cool | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.