[Info-vax] GS convert PDF to PS.

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


Den 2022-03-13 kl. 16:13, skrev Jan-Erik Söderholm:
> 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.
> 


Just a followup... I now found the "-dDEBUG" switch to GS, if this helps.
I also found the "-dBATCH" switch but that didn't change anything.


$ gs "-dDEBUG" "-dBATCH" "-dNOPAUSE" "-sDEVICE=ps2write" 
"-sOutputFile=out.ps" "-fOUT.PDF"
START 0 1442264 147528 1309952 27692 true 574 3 <0>
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.
END PROCS 5 1482472 187887 1330056 33508 true 683 3 <0>
END FONTDIR/ENCS 6 1522680 216224 1330056 35988 true 693 3 <0>
END DEVS 32 1581088 275532 1330056 35988 true 697 3 <0>
END STATD 35 1581088 295068 1330056 38868 true 702 3 <0>
END GS_FONTS 51 1691540 376199 1330056 38868 true 731 3 <0>
END BASIC COLOR 52 1691540 381800 1330056 38868 true 747 3 <0>
END IMAGE 54 1691540 388948 1330056 38868 true 752 3 <0>
BEGIN RESOURCES 91 2424788 1093925 1434768 144276 true 773 4 <0>
END CATEGORY 91 2444892 1101216 1434768 144564 true 774 5 <0>
END GENERIC 93 2464996 1122314 1434768 144564 true 776 4 <0>
END FIXED 95 2485100 1139677 1434768 144564 true 776 4 <0>
END MISC 96 2505204 1154609 1434768 144564 true 776 4 <0>
END ENCODING 103 2614092 1274075 1434768 148194 true 776 4 <0>
Extend MacRomanEncodingForTrueType for TrueType: insert /radical @ 195
Extend MacRomanEncodingForTrueType for TrueType: insert /lozenge @ 215
Extend MacRomanEncodingForTrueType for TrueType: insert /Omega @ 189
Extend MacRomanEncodingForTrueType for TrueType: insert /pi @ 185
Extend MacRomanEncodingForTrueType for TrueType: insert /partialdiff @ 182
Extend MacRomanEncodingForTrueType for TrueType: insert /apple @ 240
Extend MacRomanEncodingForTrueType for TrueType: insert /greaterequal @ 179
Extend MacRomanEncodingForTrueType for TrueType: insert /Delta @ 198
Extend MacRomanEncodingForTrueType for TrueType: insert /product @ 184
Extend MacRomanEncodingForTrueType for TrueType: insert /lessequal @ 178
Extend MacRomanEncodingForTrueType for TrueType: insert /integral @ 186
Extend MacRomanEncodingForTrueType for TrueType: cannot insert /Euro @ 219 
used for /currency
Extend MacRomanEncodingForTrueType for TrueType: insert /infinity @ 176
Extend MacRomanEncodingForTrueType for TrueType: insert /notequal @ 173
Extend MacRomanEncodingForTrueType for TrueType: insert /summation @ 183
Extend MacRomanEncodingForTrueType for TrueType: insert /approxequal @ 197
END INITFILES 214 3833168 2443707 1434768 150960 true 1014 4 <0>
%rom%[Resource.Init]Fontmap 215 3833168 2448980 1454872 156134 true 1015 4 <1>
%rom%[lib]Fontmap 229 3953792 2523266 1454872 156134 true 1015 4 <1>
END FONTS 236 3973896 2543143 1454872 156134 true 1014 4 <0>
END DEVICE 373 4416184 2947101 1453392 154654 true 1013 4 <0>
END CONFIG 373 4416184 2947371 1453392 154654 true 1013 4 <0>
END INIT 379 4516704 3036330 1697616 408174 true 1019 4 <0>
END GLOBAL 380 4516704 3040408 1697616 410490 false 1018 4 <0>
  _Interrupt_

$




More information about the Info-vax mailing list