[gs-devel] Converting PDF to a single JPG

Barry barry at polisource.com
Mon Oct 15 07:12:34 PDT 2007


I'm a new Ghostscript user and I seem to be getting errors no matter what
I do with Ghostscript 8.60 for Windows 32 on XP. In the console that comes
with Ghostscript, I can't even enter -h without getting "error: /undefined
in -h."

My goal is to convert a multipage pdf file, which consists of images of
text, into a jpg file so my OCR software can work with it. If I could get
Ghostscript to just combine all of the PDF pages into one that I can copy
to the clipboard, that should work too because I could paste it into other
software for the conversion to jpg.

To combine the pages of a pdf file into one page using Ghostscript, I
tried increasing the page height enough to fit all pages of the pdf file
and used the -dFIXEDMEDIA switch. Here's the full command and the error
message that followed:

----------------

GS>-dDEVICEWIDTHPOINTS=400 -dDEVICEHEIGHTPOINTS=5000 -dFIXEDMEDIA -dSAFER
-dBATCH C:\Documents and Settings\Owner\My Documents\other\NASA and
Space\PCIE-Report-on-NASA-IG.pdf
Error: /undefined in -dDEVICEWIDTHPOINTS=400
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   %loop_continue
  176
9   2   3   %oparray_pop   --nostringval--   --nostringval--   false   1  
%stop
ped_push   .runexec2   --nostringval--   --nostringval--   --nostringval--
  2
 %stopped_push   --nostringval--
Dictionary stack:
   --dict:1144/1684(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
Current allocation mode is local
Current file position is 24
GS>

----------------

What am I doing wrong?





More information about the gs-devel mailing list