Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?


2 Answers 2

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


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.


This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .