Converting PDF to PCL with GhostScript?

5k views Asked by At

Can I convert a pdf to pcl file with ghostscript?

I'm using Ghostscript 9.01 (gsdll32.dll) and passing the following arguments in but only get a 1k file with what looks like some header info. My pdf input is 5 pages...

Here are my arguments are they correct?:

-q
-dQUIET
-dPARANOIDSAFER
-dBATCH
-dNOPAUSE
-dNOPROMPT
-dMaxBitmap=500000000
-dFirstPage=1
-dLastPage=2147483647
-dAlignToPixels=0
-dGridFitTT=2
-sDEVICE=pxlcolor
-dTextAlphaBits=4
-dGraphicsAlphaBits=4
-dDOINTERPOLATE
-dPDFFitPage
-sFONTPATH=C:\\Windows\\Fonts
-sOutputFile=d:\\output.pcl
d:\\input.pdf
2

There are 2 answers

0
Nitin Unni On BEST ANSWER

Try triaging your issue by only adding the bare minimum parameters first. One link I saw - http://www.rhinocerus.net/forum/lang-postscript/130535-pdf-pcl-using-ghostscript.html. Here the output and input files did not have the "\" when separating folders. So that could be the issue

0
Kurt Pfeifle On

Try these options by applying them to a commandline to the Windows gswin32c.exe command. You should now see any error message that may occur with your file. Here is some simplified version of your options:

gswin32c.exe ^
  -o d:/output.pcl ^
  -dAlignToPixels=0 ^
  -dGridFitTT=2 ^
  -sDEVICE=pxlcolor ^
  -dTextAlphaBits=4 ^
  -dGraphicsAlphaBits=4 ^
  -dDOINTERPOLATE ^
  -dPDFFitPage=true ^
  -sFONTPATH=C:/Windows/Fonts ^
   d:\\input.pdf

[Parameter -dMaxBitmap=... has no effect on Windows.] Of course you should also use your original combination of options on the CLI -- you'll then see if there is a difference between yours and mine. :-)