Differences between revisions 1 and 34 (spanning 33 versions)
Revision 1 as of 2006-12-15 17:07:18
Size: 1617
Comment:
Revision 34 as of 2007-02-09 18:33:46
Size: 13008
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#acl DvGroup:read,write,delete,revert,admin All:read
Line 4: Line 6:
Line 5: Line 8:
 * Managing print jobs on UNIX
  * default printer: set LPDEST to your favorite printer
  * Printing with CLI (command line interface)
   * using lpr: lpr -P''printer'' ''myfile''
   * using lp: lp -d''printer'' ''myfile''
  * Examining the print queue with CLI
   * for a special queue: lpstat -p''printer''
   * all available queues: lpstat -p
   * all active jobs: lpstat -o
  * Cancelling of print jobs with CLI
   * use cancel and no longer lprm
   * cancel your last job on ''printer'' with: cancel ''printer''
   * to get the job-ids run lpstat and afterwards cancel
   {{{
    [myhost] % lpstat -o
     znrz1-31 ottostr 1688576 Thu Jan 4 12:20:51 2007
     znrz1-32 frida 31596544 Thu Jan 4 12:20:55 2007
     znrz1-33 wwinzig 1654900 Thu Jan 4 12:30:57 2007
     znrzc-34 ottostr 61533324 Thu Jan 4 12:32:13 2007
    [myhost] % cancel znrz1-31 znrzc-34
   }}}
Line 6: Line 30:
=== Network Printer === === Network Printers ===
Line 8: Line 32:
 ||<rowstyle="background-color: #E0E0FF;">Printer|| Model || Duplex || Color || Banner||Transparency|| A3 ||Location||old Name||Printing System||Comment||
 ||znbr|| HP Laserjet 4050N ||no||no||no||no||no||1L05||ps_br||lprng||||
 ||zncon||HP_4050N||no||no||no||no||no||Conference Printer || ps_con ||lprng||||
 ||znconc||Xerox Phaser 6250||yes||yes||no||yes||no||Conference Printer||xerocol1||lprng||||
 ||znecad||HP Laserjet 8150 || yes || no || yes || no|| yes || 2L01 || ps_lo2 || lprng ||||
 ||znld1|| HP Laserjet 8150 || yes || no || yes || no || no || 3L21 || ps_ld1 || lprng ||||
 ||znld2|| HP Laserjet 4100DTN || yes || no || yes || no || no || loc || ps_ld2 || lprng ||||
 ||znle1|| HP Laserjet 8150 || yes || no || yes || no || yes || 3L21 || ps_le1 || lprng ||||
 ||znlo1|| HP Laserjet 8150 || yes || no || yes || no|| yes || 2L01 || ps_lo1 || lprng ||||
 ||znlo1c|| Xerox Phaser 6350 || yes || yes || yes || yes || no || 2L01 || ps_col || lprng ||||
 ||znlo2|| HP Laserjet 8150 || yes || no || yes || no|| yes || 2L01 || ps_lo2 || lprng ||||
 ||znmcad|| HP Laserjet 5Si || no || no|| no|| no|| no|| 1HU01||ps_mcad ||lprng||||
 ||znpitz|| HP Laserjet 4100DTN || yes || no|| no|| no||no||1LK03||ps_pitz||lprng||||
 ||znrz1|| HP Laserjet 8150 || yes || no || no || no || no || Computer Centre || ps_rz1 || cups ||||
 ||znrzc|| Xerox Phaser 6350 || yes || yes || no || yes || no || Computer Centre || xerocol2 || cups ||||
 ||<style="background-color: #FFE0DF"> /!\ Attention: Cups Printing Service is a preliminary service. At the moment the changeover from LPRng to Cups are causing some problems. /!\ ||
 * Using cups printing commands you can not specify an option for queues depending on the LPRng printing system.


 ||<rowstyle="background-color: #E0E0FF;">Printer|| Model || Duplex || Color || Banner||Transparency|| A3 ||Location||old Name||Printing System||Further Instances||
 ||[http://ZNCUPS.ifh.de:631/printers/znbr znbr]|| HP Laserjet 4050N ||no||no||no||no||no||1L05||ps_br||lprng||||
 ||[http://ZNCUPS.ifh.de:631/printers/zncon zncon]||HP_4050N||no||no||no||no||no||Conference Printer || ps_con ||lprng||||
 ||[http://ZNCUPS.ifh.de:631/printers/znconc znconc]||Xerox Phaser 6250||yes||yes||no||yes||no||Conference Printer||xerocol1||lprng||||
 ||[http://ZNCUPS.ifh.de:631/printers/znecad znecad]||HP Laserjet 8150 || yes || no || yes || no|| yes || 2L01 || ps_lo2 || lprng || znecad/A3 ||
 ||[http://ZNCUPS.ifh.de:631/printers/znld1 znld1]|| HP Laserjet 8150 || yes || no || yes || no || no || 3L21 || ps_ld1 || lprng || znld1/simplex ||
 ||[http://ZNCUPS.ifh.de:631/printers/znld2 znld2]|| HP Laserjet 4100DTN || yes || no || yes || no || no || loc || ps_ld2 || lprng || znld2/simplex ||
 ||[http://ZNCUPS.ifh.de:631/printers/znle1 znle1]|| HP Laserjet 8150 || yes || no || yes || no || yes || 3L21 || ps_le1 || lprng || znle1/simplex ||
 ||[http://ZNCUPS.ifh.de:631/printers/znlo1 znlo1]|| HP Laserjet 8150 || yes || no || yes || no|| yes || 2L01 || ps_lo1 || lprng || znlo1/simplex ||
 ||[http://ZNCUPS.ifh.de:631/printers/znlo1c znlo1c]|| Xerox Phaser 6350 || yes || yes || yes || yes || no || 2L01 || ps_col,xerocol || lprng || znlo1c/transp, znlo1c/simplex ||
 ||[http://ZNCUPS.ifh.de:631/printers/znlo2 znlo2]|| HP Laserjet 8150 || yes || no || yes || no|| yes || 2L01 || ps_lo2 || lprng || znlo2/simplex ||
 ||[http://ZNCUPS.ifh.de:631/printers/znmcad znmcad]|| HP Laserjet 5Si || yes || no|| no|| no|| yes || 1HU01||ps_mcad ||lprng|| ||
 ||[http://ZNCUPS.ifh.de:631/printers/znpitz znpitz]|| HP Laserjet 4100DTN || yes || no|| no|| no||no||1LK03||ps_pitz||lprng|| ||
 ||[http://ZNCUPS.ifh.de:631/printers/znrz1 znrz1]|| HP Laserjet 8150 || yes || no || no || no || no || Computer Centre || ps_rz1 || cups || znrz1/simplex||
 ||[http://ZNCUPS.ifh.de:631/printers/znrzc znrzc]|| Xerox Phaser 6350 || yes || yes || no || yes || no || Computer Centre || xerocol2 || cups || znrzc/transp ||

=== Overview Cups Printing Options on UNIX ===

Printing Options are passed to Cups using the '''-o''' Option of lp and lpr:
 * lpr -o ''option1=value1'' -o ''option2=value2'' [...] file
 * lp -o ''option1=value1'' -o ''option2=value2'' [...] file

||<rowstyle="background-color: #E0E0FF;">Option|| Meaning || Example || Comment||
|| sides=one-sided|| disables duplex printing || lpr -o sides=one-sided testpage.ps || use ''' ''printer''/simplex''' if supported ||
|| sides=two-sided-short-edge|| enables duplex printing for landcape pages || lpr -o sides=two-sided-short-edge myfile.gif || ||
|| sides=two-sided-long-edge|| enables duplex printing for portrait pages|| lpr -o sides=two-sided-long-edge info.txt|| default ||
|| page-ranges=RANGE|| not the complete document is printed, but only the specified pages|| lpr -o page-range=1,3-5,7 docu.ps || ||
|| number-up=number|| places multiple document pages on a single printed page || lpr -o number-up=4 project.pdf|| supported are: 1, 2, 4, 6, 9, and 16 ||
|| Resolution=xxx|| changes printers resolution || lpr -o Resolution=600dpi testpage.ps || lpoptions can be used to find out supported Resoltions fo a queue: {{{ lpoptions -p queuename -l |grep Resolution }}}||
|| media=Transparency|| prints on transparent Media || lpr -o media=Transarency talk.ps || use ''' ''printer''/transp''' if supported ||
|| Page``Size=A3|| prints on DIN A3 paper || lpr -o Page``Size=A3 picture.gif || use ''' ''printer''/A3''' if supported ||
|| scaling=number || The scaling value is a number from 1 to 800 specifying the size in relation to the page (not the image.)|| lpr -o scaling=100 pict.gif || can be used for image formats (GIF,JPEG,TIFF,...)||
|| landscape ||rotate the page 90 degrees to print in landscape orientation|| lpr -o landscape picture.jpg || ||
|| orientation-requested=N || rotates the page depending on the value of N || lpr -o orientation-requested=4 file.ps || possible values: '''3''': no rotation, '''4''': 90 degrees, '''5''': 270 degrees, '''6''': 180 degrees ||
For more options and additional information see the [http://localhost:631/sum.html "Cups Software User Manual"]
(If there is no Cups daemon running on the local machine, this link won't be available)

=== Frequently Asked Questions ===
==== Why changing the printing system? ====
 * LPRng is no longer supported
 * Cups is better intergrated in Linux Desktops like KDE and Gnome,in Open``Office and other applications
 * the user can select features like resolution, duplexing, pagesize etc.
 * Cups is easier for the administrator. The printer PPD files are used.
 * Samba and Cups are working very well together for the Windows Print Service.

==== Which file formats can Cups process ? ====
 * Post``Script, PDF, International Text, TIFF, GIF, PNG, JPEG, SUN−Raster and other graphic formats
 * CUPS uses the configuration file /etc/cups/mime.types to define the rules, which are applied to unknown file types in order to get a MIME typization for them.

==== Which applications support cups features on a UNIX System ? ====
==== How can I print simplex on a duplex printer on a UNIX system ? ====
  use option '''sides=one-sided'''
 * using lpr: lpr -P''printer'' -o sides=one-sided ''myfile''
 * using lp: lp -d ''printer'' -o sides=one-sided ''myfile''
 * if simplex instance exists: lp -d ''printer''/simplex ''myfile''

==== Why there are not an A3 queue and a transparency queue anymore? ====
 * Now there are only one queue for a printer. The filtering of the print job will be done on the local host, no longer on the print server. The user can specify all possible features via command line option or GUI.
 * Lists the printer specific options and their current settings with
    lpoptions -p ''printer'' -l
 * examples
  * A3 printing: lp -o pagesize=A3 file.ps
  * transparencies: lpr -o media=Transparency talk.ps
       
==== How can I remove a printjob on a UNIX system? ====
 The problem is that the Cups job on the local system gets a job-id, but on the print server a different one. After finding out the job-id on the print server you can remove it. Use cancel and no longer lprm for removing your print jobs.

==== How can I change personal printer specific option settings? ====
 Use lpoptions to save personal option settings in ~/.lpoptions.
 Example: lpoptions -o pagesize=A3 -p znecad

==== How can I print multiple Copies of one Printjob with CLI? ====
 * using lp: lp -n ''number-of-copies'' ''file''
Line 24: Line 110:
Copies are not collated by default. Use the ''-o Collate=True'' option to get collated copies:
 * lp -n ''number-of-copies'' -o Collate=True ''file''

==== How can I change the Layout of the Outputpages when using N-Up printing? ====
In order to change the borders around each page, use the ''-o page-border=value'' option. Supported borders are:
 * '''none''': do not draw a border (default)
 * '''double''': draw two hairline borders around each page
 * '''double-thick''': draw two 1pt borders around each page
 * '''single''': draw one hairline border around each page
 * '''single-thick''': draw one 1pt border around each page
'''Example:''' lp -o number-up=4 -o page-border=double ''myfile''

In order to chooses the layout of the pages on each output page, use the ''-o number-up-layout=value'' option.
Possible values are:
 * '''lrtb''': Left to right, top to bottom (default)
 * '''lrbt''': Left to right, bottom to top
 * '''rlbt''': Right to left, bottom to top
 * '''rltb''': Right to left, top to bottom
 * '''tblr''': Top to bottom, left to right
 * '''tbrl''': Top to bottom, right to left
 * '''btlr''': Bottom to top, left to right
 * '''btrl''': Bottom to top, right to left

'''Understanding the layouts:''' The default layout is '''lrtb'''(Left to right, top to bottom). This means: using a number-up of 4, the first page will be printed on the top-left of the outputpage, the second page will be printed on the top-right, the third page will be printed on the bottem-left and the fourth page on the bottom-right of the outputpage.

'''Example:''' lp -o number-up=4 -o number-up-layout=btrl ''myfile''

==== I'm using psutils (pstops,psnup,psbook). Even though I'm using the option ''sides=two-sided-short-edge'' the output was not arranged in the correct order. What can I do? ====
 * the psutils tools are old and not maintained for 10 years, but there are not a replacement for them.
 * With the following command you can bypass the postscript filter
       '''lp -o document-format=application/bindshort -d''printer'' ''myfile'' '''
    
==== I'm using psutils (pstops,psnup,psbook). On the Xerox Color Printer I get wrong output with a different font. What can I do? ====
 * the psutils tools caused this problem.
 * With the following command you can bypass the postscript filter
       '''lp -o document-format=application/bindlong -d''printer'' ''myfile'' '''
   or '''lp -o document-format=application/bindshort -d''printer'' ''myfile'' '''
 
=== Printing from Notebooks ===
==== Linux Notebooks ====
===== using cups =====
If you used one of the following methods to make your local cups to communicate with the server, you can use cups as described above.
====== with local cups-daemon ======
 * If you want your Cupsd to communicate with the server permanently, just add the line '''''Browsepoll zncups.ifh.de''''' to ''''''/etc/cups/cupsd.conf'''''' and restart the cups-deamon by typing '''''/etc/init.d/cups restart''''' as root. From now on, the cups-daemon will comunicate with zncups everytime cups is started.
 * If you just want cups to communicate with the server for the current session, you can start the cups-polld manualy. Generaly it is located in '''''/usr/lib/cups/daemon/'''''. You can start it by typing '''''/usr/lib/cups/daemon/cups-polld zncups.ifh.de 631 30 631''''' as root. If you do so, there is no need to restart the local cups-server. By default, the printer information are lost 5 minutes after stopping the cups-polld.
 * or use the usual "add new printer" dialogue and provide the name of the queue which is the printers name and the IP address of the server or run as root
 {{{
  lpadmin -p <printer_name> -E -v ipp://zncups.ifh.de/<printer_name>}}}

====== without local cups-daemon ======
If you have no local cupsd running, just change the '''''Servername''''' directive in /etc/cups/client.conf to '''''zncups.ifh.de'''''
===== lpr/lp based printing system =====
 If you work with a lpr/lp based subsystem a printcap entry in your /etc/printcap file would probably look like this:
 {{{
<printer_name>:\
:rm=zncups.ifh.de:\
:rp=<printer_name> }}}

==== Windows Notebooks ====
 * click "run" in the Startmenu
 * type "\\zncups" and press Enter. Your notebook will connect to the print server.
 * choose a printer. doubleclick to add a printer to your notebook. The printerdrivers will be downloaded.
 * go to "Printers and Faxes" in the Startmenu if you want to change the Printers configuration.
 * thats all

=== Known Problems using Cups ===
 * network trouble or problems on the print server can cause an empty printer setup on the clients
 * psutils and cups filter don't work together

TableOfContents

Printing with Cups Server ZNCUPS

  • Access to [http://ZNCUPS.ifh.de:631 ZNCUPS] for managing your own jobs

  • Managing print jobs on UNIX
    • default printer: set LPDEST to your favorite printer
    • Printing with CLI (command line interface)
      • using lpr: lpr -Pprinter myfile

      • using lp: lp -dprinter myfile

    • Examining the print queue with CLI
      • for a special queue: lpstat -pprinter

      • all available queues: lpstat -p
      • all active jobs: lpstat -o
    • Cancelling of print jobs with CLI
      • use cancel and no longer lprm
      • cancel your last job on printer with: cancel printer

      • to get the job-ids run lpstat and afterwards cancel
            [myhost] % lpstat -o
             znrz1-31                ottostr        1688576   Thu Jan  4 12:20:51 2007
             znrz1-32                frida         31596544   Thu Jan  4 12:20:55 2007
             znrz1-33                wwinzig        1654900   Thu Jan  4 12:30:57 2007
             znrzc-34                ottostr       61533324   Thu Jan  4 12:32:13 2007
            [myhost] % cancel znrz1-31 znrzc-34

Network Printers

Overview Cups Printing Options on UNIX

Printing Options are passed to Cups using the -o Option of lp and lpr:

  • lpr -o option1=value1 -o option2=value2 [...] file

  • lp -o option1=value1 -o option2=value2 [...] file

Option

Meaning

Example

Comment

sides=one-sided

disables duplex printing

lpr -o sides=one-sided testpage.ps

use printer/simplex if supported

sides=two-sided-short-edge

enables duplex printing for landcape pages

lpr -o sides=two-sided-short-edge myfile.gif

sides=two-sided-long-edge

enables duplex printing for portrait pages

lpr -o sides=two-sided-long-edge info.txt

default

page-ranges=RANGE

not the complete document is printed, but only the specified pages

lpr -o page-range=1,3-5,7 docu.ps

number-up=number

places multiple document pages on a single printed page

lpr -o number-up=4 project.pdf

supported are: 1, 2, 4, 6, 9, and 16

Resolution=xxx

changes printers resolution

lpr -o Resolution=600dpi testpage.ps

lpoptions can be used to find out supported Resoltions fo a queue:  lpoptions -p queuename -l |grep Resolution 

media=Transparency

prints on transparent Media

lpr -o media=Transarency talk.ps

use printer/transp if supported

PageSize=A3

prints on DIN A3 paper

lpr -o PageSize=A3 picture.gif

use printer/A3 if supported

scaling=number

The scaling value is a number from 1 to 800 specifying the size in relation to the page (not the image.)

lpr -o scaling=100 pict.gif

can be used for image formats (GIF,JPEG,TIFF,...)

landscape

rotate the page 90 degrees to print in landscape orientation

lpr -o landscape picture.jpg

orientation-requested=N

rotates the page depending on the value of N

lpr -o orientation-requested=4 file.ps

possible values: 3: no rotation, 4: 90 degrees, 5: 270 degrees, 6: 180 degrees

For more options and additional information see the [http://localhost:631/sum.html "Cups Software User Manual"] (If there is no Cups daemon running on the local machine, this link won't be available)

Frequently Asked Questions

Why changing the printing system?

  • LPRng is no longer supported
  • Cups is better intergrated in Linux Desktops like KDE and Gnome,in OpenOffice and other applications

  • the user can select features like resolution, duplexing, pagesize etc.
  • Cups is easier for the administrator. The printer PPD files are used.
  • Samba and Cups are working very well together for the Windows Print Service.

Which file formats can Cups process ?

  • PostScript, PDF, International Text, TIFF, GIF, PNG, JPEG, SUN−Raster and other graphic formats

  • CUPS uses the configuration file /etc/cups/mime.types to define the rules, which are applied to unknown file types in order to get a MIME typization for them.

Which applications support cups features on a UNIX System ?

How can I print simplex on a duplex printer on a UNIX system ?

  • use option sides=one-sided

  • using lpr: lpr -Pprinter -o sides=one-sided myfile

  • using lp: lp -d printer -o sides=one-sided myfile

  • if simplex instance exists: lp -d printer/simplex myfile

Why there are not an A3 queue and a transparency queue anymore?

  • Now there are only one queue for a printer. The filtering of the print job will be done on the local host, no longer on the print server. The user can specify all possible features via command line option or GUI.
  • Lists the printer specific options and their current settings with
    • lpoptions -p printer -l

  • examples
    • A3 printing: lp -o pagesize=A3 file.ps
    • transparencies: lpr -o media=Transparency talk.ps

How can I remove a printjob on a UNIX system?

  • The problem is that the Cups job on the local system gets a job-id, but on the print server a different one. After finding out the job-id on the print server you can remove it. Use cancel and no longer lprm for removing your print jobs.

How can I change personal printer specific option settings?

  • Use lpoptions to save personal option settings in ~/.lpoptions. Example: lpoptions -o pagesize=A3 -p znecad

How can I print multiple Copies of one Printjob with CLI?

  • using lp: lp -n number-of-copies file

Copies are not collated by default. Use the -o Collate=True option to get collated copies:

  • lp -n number-of-copies -o Collate=True file

How can I change the Layout of the Outputpages when using N-Up printing?

In order to change the borders around each page, use the -o page-border=value option. Supported borders are:

  • none: do not draw a border (default)

  • double: draw two hairline borders around each page

  • double-thick: draw two 1pt borders around each page

  • single: draw one hairline border around each page

  • single-thick: draw one 1pt border around each page

Example: lp -o number-up=4 -o page-border=double myfile

In order to chooses the layout of the pages on each output page, use the -o number-up-layout=value option. Possible values are:

  • lrtb: Left to right, top to bottom (default)

  • lrbt: Left to right, bottom to top

  • rlbt: Right to left, bottom to top

  • rltb: Right to left, top to bottom

  • tblr: Top to bottom, left to right

  • tbrl: Top to bottom, right to left

  • btlr: Bottom to top, left to right

  • btrl: Bottom to top, right to left

Understanding the layouts: The default layout is lrtb(Left to right, top to bottom). This means: using a number-up of 4, the first page will be printed on the top-left of the outputpage, the second page will be printed on the top-right, the third page will be printed on the bottem-left and the fourth page on the bottom-right of the outputpage.

Example: lp -o number-up=4 -o number-up-layout=btrl myfile

I'm using psutils (pstops,psnup,psbook). Even though I'm using the option ''sides=two-sided-short-edge'' the output was not arranged in the correct order. What can I do?

  • the psutils tools are old and not maintained for 10 years, but there are not a replacement for them.
  • With the following command you can bypass the postscript filter
    • lp -o document-format=application/bindshort -dprinter myfile

I'm using psutils (pstops,psnup,psbook). On the Xerox Color Printer I get wrong output with a different font. What can I do?

  • the psutils tools caused this problem.
  • With the following command you can bypass the postscript filter
    • lp -o document-format=application/bindlong -dprinter myfile

    • or lp -o document-format=application/bindshort -dprinter myfile

Printing from Notebooks

Linux Notebooks

using cups

If you used one of the following methods to make your local cups to communicate with the server, you can use cups as described above.

with local cups-daemon
  • If you want your Cupsd to communicate with the server permanently, just add the line Browsepoll zncups.ifh.de to /etc/cups/cupsd.conf and restart the cups-deamon by typing /etc/init.d/cups restart as root. From now on, the cups-daemon will comunicate with zncups everytime cups is started.

  • If you just want cups to communicate with the server for the current session, you can start the cups-polld manualy. Generaly it is located in /usr/lib/cups/daemon/. You can start it by typing /usr/lib/cups/daemon/cups-polld zncups.ifh.de 631 30 631 as root. If you do so, there is no need to restart the local cups-server. By default, the printer information are lost 5 minutes after stopping the cups-polld.

  • or use the usual "add new printer" dialogue and provide the name of the queue which is the printers name and the IP address of the server or run as root
      lpadmin -p <printer_name> -E -v ipp://zncups.ifh.de/<printer_name>

without local cups-daemon

If you have no local cupsd running, just change the Servername directive in /etc/cups/client.conf to zncups.ifh.de

lpr/lp based printing system
  • If you work with a lpr/lp based subsystem a printcap entry in your /etc/printcap file would probably look like this:
    <printer_name>:\
    :rm=zncups.ifh.de:\
    :rp=<printer_name> 

Windows Notebooks

  • click "run" in the Startmenu
  • type "\\zncups" and press Enter. Your notebook will connect to the print server.
  • choose a printer. doubleclick to add a printer to your notebook. The printerdrivers will be downloaded.
  • go to "Printers and Faxes" in the Startmenu if you want to change the Printers configuration.
  • thats all

Known Problems using Cups

  • network trouble or problems on the print server can cause an empty printer setup on the clients
  • psutils and cups filter don't work together

CUPS/Archive/Printing_with_Cups (last edited 2020-05-22 01:39:00 by FabianKrack)