473,466 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 27344
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ming | last post by:
Hi All, I want to write a PHP webpage which allows people to upload images (no matter what formats) to me and at the same time converts any non-jpeg image to JPEG. Here's what I have: ...
3
by: Steve Holden | last post by:
If nobody has a quick answer I'll go to the PIL list, but I'm having problems with PIL JPEG support on Windows, and figured someone on c.l.py might have solved this problem. I built the Cygwin...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
3
by: bull.enteract | last post by:
Ok, I start off with a bitmap image. I encode it as a jpeg and send it across the network and pick it up on the other end. Now I have the jpeg image on the other end as an arrray of bytes and I...
16
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation....
0
by: Johann Blake | last post by:
In my need to decode a JPEG 2000 file, I discovered like many that there was no functionality for this in the .NET Framework. Instead of forking out a pile of cash to do this, I came up with the...
10
by: rtilley | last post by:
Hope it's not inappropriate to post this here. Could someone critique my code? I have no Python programmers in my office to show this to. The script works OK, but should I do it differently? I...
0
by: Jack Wu | last post by:
Hi I've spent a good majority of my day trying to figure out how to have PIL 1.1.5 working on my OSX 10.3.9_PPC machine. I'm still stuck and I have not gotten anywhere. Could somebody please...
1
by: Smokey Grindel | last post by:
I have a bitmap object I want to return as a JPEG image with a compression set at 90% and progressive passes enabled, how can I do this in .NET 2.0? Progressive passes are not necessary but the...
1
by: Joe Cool | last post by:
I am attempting to add a function to an application I am working on to modify the JPEG Comment in a Jpeg image file. I can retrieve the JPEG Comment with no problem. The problem is modifying it....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.