简体   繁体   中英

Linux print document to standard output or file

Is there any possibility to print document in Linux to standard output, formed for later sending directly to printer's queue and is there any generic format, suitable for all network printers?

Indeed, I do need to do the following process:
1. Print doc to the above mentioned formatted output (or file).
2. Transfer this to the remote device.
3. Send this to the Printer.

Some more details: Document is printed on one hardware Server, being sent to some Device with no printer Driver (so, it Detects printer as a Network device) and then send the Document to queue as a TCP client.

There is no format all printers understand, other than plain text of course. Which has nothing to do with Linux, really. But if you're willing to include some processing in step 3, sure, just write pdf or postscript and send that through the standard printer queue.

I would recommend that you print to PostScript or PDF. For example, here is a CUPS PDF printer . Another way to do it would be to write your own backend. Here is an example of how to write a CUPS backend in a shell script .

is there any generic format, suitable for all network printers?

No. Some printers will understand PostScript, others will understand PCL, and others will require other specific formats. There is no "lingua franca" in the printer world as far as hardware is concerned, which is why you must go through a print manager.

Is there any possibility to print document in Linux to standard output, formed for later sending directly to printer's queue

Since there is no common printing format, you can't make such a document. The simplest thing on Linux is to print either to PostScript or to PDF, and feed that again to CUPS (or any other print manager you use) when you want to output on a specific printer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM