1
votes

Just installed GhostScript 9.21 for Windows. Already tried some commands from the website (https://www.ghostscript.com/doc/current/Use.htm) at the GhostScript command prompt, but they didn't work. Executed gswin32c from cmd as well - the same result. I need to convert SPL and PCL files to PDF. Does anyone know the right way to do it? Thanks in advance.

UPD: there are different error messages. the most common output is: PS C:\Program Files (x86)\gs\gs9.21\bin> .\gswin32c.exe -sDEVICE=pdfwrite -o C:\1\00002.pdf C:\1\00002.pcl

GPL Ghostscript 9.21 (2017-03-16) Copyright (C) 2017 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /undefined in ?? perand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1983 1 3 %oparray_pop 1982 1 3 %oparray_ pop 1966 1 3 %oparray_pop 1852 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostr ingval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1204/1684(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)-- Current allocation mode is local Current file position is 4 GPL Ghostscript 9.21: Unrecoverable error, exit code 1

1
what you mean by didn't work? show any error messageGahan
@Gahan: updated my question with example of an errorEva Leigh

1 Answers

1
votes

You cannot use Ghostscript to read a PCL file, because it only handles PostScript and PDF. If you want to handle PCL then you need GhostPCL. So that would be gpcl6win32.exe not gswin32.exe (and similarly for XPS input you need GhostXPS, gxpswin32.exe).

There are some differences between the two but in general the same command line will work. Be aware that PCL uses a graphics model which is not compatible with PDF, if your PCL file uses RasterOps then the PDF produced by pdfwrite will be incorrect.

If your .spl files are PostScript or PDF, then you can use Ghostscript, but not otherwise.