3

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?

3

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...

1

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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