Search code examples
printingdriverghostscriptpostscriptppd

Ghostscript output to file with ESC-P sequences


For a project (printing nanofluids with an Epson printer) I want to see the the code that the computer sends to the printer. I am running Ubuntu 16.04 and have an Epson Stylus SX600FW printer.
Using Ghostscript 9.18 I am trying to print a simple file test.ps and I want to obtain the output file that is being send to the printer. This file should contain some ESC/P sequences if I am right.

I tried to obtain such a file using:

gs -sDevice=epson -sOutputFile=test1output test1.ps

Whatever I try, I can't find the output file anywhere, so I doubt it is even created. Then next if I have the output file, how can I read the ESC/P sequences? Thanks in advance!


Solution

  • For me, that command line results in a file called 'test1output' in the current directory. If you are unable to find the file you could try specifying a complete path and file spec, or at least -sOutputFile=./test1output

    As for reading the sequences, any binary editor will read the file.