Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a string of raw printer commands that are for my postscript printer saved to a file.

I believe there is a lpr option like -o raw which will read these raw command and send them to the printer.

How can I specify a virtual printer driver so that I can send the raw commands to lpr and have then come out as a postscript (or ultimately pdf) file?

Is there a simpler way to convert raw printer commands back into postscript?

share|improve this question
up vote 2 down vote accepted

If it's a PostScript printer, surely the raw printer output is already PostScript...?

Basic PostScript is human-readable. Take a look at the start of the file and see if it starts with %! or %!PS-2 or similar...

share|improve this answer

If it is some non-postscript printer, you are out of luck. PostScript is a page description language, which describes curves by curves. The raw input to the printer is most probably some raster format. In the best case you'll get a pixelated rendering of the image. Or ir might be some somewhat higher level language, but Im' not aware of any reverse translator. I might be wrong, the experts should know.

share|improve this answer

Recent versions of ghostscript include a pcl interpreter which is a page description language as is postscript. Microsoft also has a couple page description languages. Interpreters for these languages may be available. If the printer is well known It may be possible to emulate it (specifically all daisy wheel printers are very easy to emulate and less will do so for many of them. Dot matrix printers compatible with epson 9 pin and 24 pin models are not too difficult to emulate) but if the print protocol is not documented you are out of luck.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.