Printer instances are, as their name implies, copies of a printer that have certain options associated with them. Use the lpoptions command to create a printer instance:. The remaining options are then associated with the instance instead of the main queue. For example, the following command creates a duplex instance of the LaserJet queue:. Both the lp and lpr commands have options for printing more than one copy of a file:.
Copies are normally not collated for you. The cancel 1 and lprm 1 commands cancel a print job:. The job-id is the number that was reported to you by the lp command. You can also get the job ID using the lpq 1 or lpstat commands:. The job-id is the number that was reported to you by the lp or lpstat commands. Destination is the name of a printer or class that you want to actually print the job. The available media sizes, types, and sources depend on the printer, but most support the following options case is not significant :.
You can list them using the lpoptions 1 command:. When Custom is listed for the PageSize option, you can specify custom media sizes using one of the following forms:. The -o landscape option will rotate the page 90 degrees to print in landscape orientation:.
If only one banner file is specified, it will be printed before the files in the job. If a second banner file is specified, it is printed after the files in the job. The available banner pages depend on the local system configuration; CUPS includes the following banner files:. Higher priority jobs are printed before lower priority jobs, however submitting a new job with a high priority will not interrupt an. Normal order prints page 1 first, page 2 second, and so forth.
In any case - is there a way for me to utilize this particular code from the command line not pdf2ps and the like? Say, by using lpr to "print to file" to a postscript file - as if I was using the dialog above?
You could use the cups-pdf package as a solution independent from gnome. Then do as suggested by Noam to print to file. Same can be done with the cups printing system, which your applications use when they send print commands.
You can also use lp printing command to print a file to the default or only printer on the system:. In case anyone else is late to the party like me it seems the following does the trick at reproducing "print to file". I discovered this by opening a pdf with Evince in Gnome and then printing to file. It seems cairo graphics is used in the background when printing to a file this way: running pdfinfo on the resulting file reveals.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. What is "Print to File" and can it be used from command line? Ask Question. Asked 9 years, 7 months ago.
Active 4 months ago. Viewed 13k times. When you select "Print to File" in a Gnome print dialog not cups-pdf Improve this question. Renan Ah, so its the cairo backend there! Destinations are individual printers and classes pools of printers. Printers use a description file with one or more driver "filter" programs that communicate with the printer through a "backend" program. Classes are associated with one or more printers and are typically used to distribute print jobs amongst a group of printers or provide redundancy or high availability when printing.
Print jobs sent to a class are forwarded to the next available printer in the class. The lpadmin 8 program is used to add, modify, or delete destinations, while the lpinfo 8 command is used to list the available printer drivers and backends. The cupsctl 8 program is used to manage the printing system as a whole, including things like debug logging and printer sharing.
The lpadmin command is used to create, modify, or delete a printer. The -p option specifies a printer to create or modify:.
0コメント