[Info-vax] GS convert PDF to PS.

Jan-Erik Söderholm jan-erik.soderholm at telia.com
Sun Mar 13 11:13:09 EDT 2022


Hi.

I'm new to Ghostscript.
I try to convert a PDF file to a PS file.

And yes, this a step in the "print a PDF file" project.
I had some issues with getting the Xerox printer to print
a plain PDF file so I thought about converting i to to PS...

Have tried with:

$ gs "-dNOPAUSE" "-sDEVICE=ps2write" "-sOutputFile=out.ps" "-fOUT.PDF"

The input file OUT.PDF only contains one page with 6-7 text lines
and one Code128 barcode. File created from the Python tool Reportlab.
And "out" refers to the Python step, it is the "input" file to GS.

The PDf file opens fine on any other environment, also when put in
a VMS directory served by WASD.

I have checked that the file org is as required by GS:

  Record format:      Stream_LF, maximum 0 bytes, longest 16384 bytes
  Record attributes:  Carriage return carriage control


GS just hangs and consumes 100% cpu until I end it with ctrl-C.
Does it wait for some SYS$INPUT input? Any switch I'm missing?

$ gs "-dNOPAUSE" "-sDEVICE=ps2write" "-sOutputFile=out.ps" "-fOUT.PDF"
GPL Ghostscript 9.55.0 (2021-09-27)
Copyright (C) 2021 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
HV04JES_01 16:01:48 GS        CPU=00:04:01.95 PF=48109 IO=152495 MEM=1369
HV04JES_01 16:01:51 GS        CPU=00:04:04.56 PF=48109 IO=152496 MEM=1369
HV04JES_01 16:01:53 GS        CPU=00:04:06.37 PF=48109 IO=152497 MEM=1369
  Interrupt

$

One empty OUT.PS file is created and some empty TMPDIR files.

_TEMP_T45404.;1       1/52        13-MAR-2022 16:01:45.84
_TEMP_U45404.;1       0/0         13-MAR-2022 16:01:45.85
_TEMP_V45404.;1       0/0         13-MAR-2022 16:01:45.85
_TEMP_W45404.;1       0/0         13-MAR-2022 16:01:45.85

Any ideas? Some simple example for a GS command line to convert
a PDF file to a PS file?

Best Regards,

Jan-Erik.




More information about the Info-vax mailing list