Discussion:
Ghostscript to Convert PDF to BMP?
(too old to reply)
Mark Kolenski
2006-11-16 19:21:06 UTC
Permalink
Anyone with experience using Ghostscript to Convert PDF to BMP? I use
variations on the following command line but the problem is how to come up
with a bmp that accurately reflects the content of the PDF, especially when
it is text. Images are an issue also, but I am looking to make a bmp that
is as readable as possible. Any suggestions on settings to try or even an
alternative toolkit? Thanks.

gswin32c.exe -sOutputFile="Test.bmp" -sDEVICE=bmp256 -dNOPAUSE -dTextAlphaBits=4
-dGraphicsAlphaBits=4 -dLastPage=1 -r300 -g400x170 -dPDFFitPage -dBATCH
"Test.pdf"
--
Posted via a free Usenet account from http://www.teranews.com
Mark Kolenski
2006-11-16 19:25:34 UTC
Permalink
I should have mentioned that we are scaling these documents DOWN to maybe
400 x 170 or so.
Post by Mark Kolenski
Anyone with experience using Ghostscript to Convert PDF to BMP? I use
variations on the following command line but the problem is how to come up
with a bmp that accurately reflects the content of the PDF, especially when
it is text. Images are an issue also, but I am looking to make a bmp that
is as readable as possible. Any suggestions on settings to try or even an
alternative toolkit? Thanks.
gswin32c.exe -sOutputFile="Test.bmp" -sDEVICE=bmp256 -dNOPAUSE -dTextAlphaBits=4
-dGraphicsAlphaBits=4 -dLastPage=1 -r300 -g400x170 -dPDFFitPage -dBATCH
"Test.pdf"
--
Posted via a free Usenet account from http://www.teranews.com
--
Posted via a free Usenet account from http://www.teranews.com
Aandi Inston
2006-11-16 19:54:48 UTC
Permalink
Post by Mark Kolenski
I should have mentioned that we are scaling these documents DOWN to maybe
400 x 170 or so.
Except in rare cases, I wouldn't expect any text to be readable but
large headlines.

Is the quality noticeably different than if you open a PDF in Adobe
Reader, and size the window to be 400 x 170?
----------------------------------------
Aandi Inston ***@dial.pipex.com http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.
Mark Kolenski
2006-11-16 23:07:22 UTC
Permalink
Thanks for your reply. Yeah, I've been thinking that there's only so much
we can expect out of so few pixels. I still wasn't completely clear with my
question. We actually take an original 8-1/2 x 11 document and make 3 pdf's
out of it: top, middle, and bottom. This is done on a server. It is each
of these that we are resizing to 400 x 170 bmp's for display on a device
running embedded Java. When we open the original document (or the 1/3's)
the quality is great, but what we get in the bmp is as you said virtually
unreadable. We used to go to 300 x 150 but we have new real estate on the
newer display device we are using so going to the bigger size actually made
a lot of it almost readible. So, I'm trying to see if there is any way to
squeeze more out of it. We can't really afford the memory (nor do we have
the screen size) to make it much bigger. I'm also wondering if there is
some sort of thumbnail or icon technology that we might be able to leverage.
Post by Aandi Inston
Post by Mark Kolenski
I should have mentioned that we are scaling these documents DOWN to maybe
400 x 170 or so.
Except in rare cases, I wouldn't expect any text to be readable but
large headlines.
Is the quality noticeably different than if you open a PDF in Adobe
Reader, and size the window to be 400 x 170?
----------------------------------------
Please support usenet! Post replies and follow-ups, don't e-mail them.
--
Posted via a free Usenet account from http://www.teranews.com
macropod
2006-11-18 05:14:44 UTC
Permalink
Hi Mark,

Maybe you should consider outputting the PS to SVG or EMF/WMF. That way
you'll have scalable images with vector data.

Note, though, that outputting to SVG might not be a viable long-term
strategy. Adobe has decided to discontinue support for Adobe SVG Viewer
starting from January 1, 2008.



Cheers
--
macropod
[MVP - Microsoft Word]
Post by Mark Kolenski
I should have mentioned that we are scaling these documents DOWN to maybe
400 x 170 or so.
Post by Mark Kolenski
Anyone with experience using Ghostscript to Convert PDF to BMP? I use
variations on the following command line but the problem is how to come up
with a bmp that accurately reflects the content of the PDF, especially when
it is text. Images are an issue also, but I am looking to make a bmp that
is as readable as possible. Any suggestions on settings to try or even an
alternative toolkit? Thanks.
gswin32c.exe -sOutputFile="Test.bmp" -sDEVICE=bmp256 -dNOPAUSE -dTextAlphaBi
ts=4
Post by Mark Kolenski
Post by Mark Kolenski
-dGraphicsAlphaBits=4 -dLastPage=1 -r300 -g400x170 -dPDFFitPage -dBATCH
"Test.pdf"
--
Posted via a free Usenet account from http://www.teranews.com
--
Posted via a free Usenet account from http://www.teranews.com
Dan Coby
2006-11-17 01:22:26 UTC
Permalink
Post by Mark Kolenski
Anyone with experience using Ghostscript to Convert PDF to BMP? I use
variations on the following command line but the problem is how to come up
with a bmp that accurately reflects the content of the PDF, especially when
it is text. Images are an issue also, but I am looking to make a bmp that
is as readable as possible. Any suggestions on settings to try or even an
alternative toolkit? Thanks.
gswin32c.exe -sOutputFile="Test.bmp" -sDEVICE=bmp256 -dNOPAUSE -dTextAlphaBits=4
-dGraphicsAlphaBits=4 -dLastPage=1 -r300 -g400x170 -dPDFFitPage -dBATCH
"Test.pdf"
As Aandi has already pointed out, 400x170 is not many pixels for a displaying
a full size page of text.

Ghostscript's bmp256 uses a very limited palette of colors. To compensate for
the limited palette, ghostscript will often halftone non saturated colors. This
probably makes things worse for your situation.

I recommend using another device like bmp16m (24 bit rgb) which will
eliminate the problems caused by the limited color palette.

Ghostscript's 256 color output devices (like bmp256) do not attempt to
optimize the choice of colors in the palette to produce the best output. There
are other packages which will attempt optimize the output pallette for the
best image quality.

If you need to produce output with only a 256 color palette, I suggest that you
create 24 bit RGB using ghostscript (bmp16m, ppmraw, tiff24nc, etc) and then
post process the output with another application to produce the final output.
Loading...