[Image-SIG] pdf to image

Christopher Barker Chris.Barker at noaa.gov
Mon Jan 14 20:44:38 CET 2008


OK, a bit (or a lot!), but once someone else brought it up---

Carl Karsten wrote:
>      # gs -sDEVICE=png16m -sOutputFile=x.png -dBATCH -dNOPAUSE badge.pdf

I've used similar code. However, in my case, we're thumbnailing 
arbitrary pdfs, which could be any size -- usually they are US-letter or 
A4, but there can be poster-sized ones there too. So my question is:

How to I tell ghostscript to make the resulting image a given size (say 
100x100 or less), or how do I use ghostscript to tell me the size of the 
pdf at hand, and then I could calculate the DPI myself? Any ideas?

To the OP: you don't seem to be specifying the DPI that you want. The 
default may be OK, but  you may want to be explicit:

-r150

gives you 150dpi.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Image-SIG mailing list