User Tools

Site Tools


articles:cupsprinting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
articles:cupsprinting [2009/02/11 12:28] timallenarticles:cupsprinting [2009/02/16 12:13] timallen
Line 71: Line 71:
 Using Samba, the CUPS Windows Postscript driver allows for "easy" downloading of a single postscript driver to Windows machines from the Samba CUPS-enabled server, irrespective of the actual printer. Using Samba, the CUPS Windows Postscript driver allows for "easy" downloading of a single postscript driver to Windows machines from the Samba CUPS-enabled server, irrespective of the actual printer.
  
-Obtain the tarball from the CUPS website, extract and build. ''libcupsys2-dev'' is needed for the make install, smbclient is needed by cupsaddsmb, so :+Obtain the tarball from the CUPS website, extract and build. ''libcupsys2-dev'' is needed for the make install, smbclient is needed by cupsaddsmb, so: 
   aptitude install libcupsys2-dev smbclient   aptitude install libcupsys2-dev smbclient
   cd /tmp   cd /tmp
Line 233: Line 234:
   BrowseAllow @LOCAL   BrowseAllow @LOCAL
   BrowsePoll server.domain.com   BrowsePoll server.domain.com
 +
 +===== Printing Text Files =====
 +Print options can be specified on the ''lpr'' command line. e.g.
 +
 +  lpr -pLaserjet-6P -o cpi=11.5 -o lpi=6 -o page-top=33 [file]
 +
 +Alternatively, printer options can be set by the ''lpoptions'' command:
 +
 +  lpoptions -pLaserjet-6P -o cpi=11.5 -o lpi=6 -o page-top=33
 +
 +==== Printer Instances ====
 +Multiple options set can be set up using printer "instances", where each instance of a single printer can have a different set of options.
 +
 +To set a printer instance, use:
 +
 +  lpoptions -pLaserjet-6P/instance1 -o cpi=11.5 -o lpi=6 -o page-top=33
 +
 +To delete an instance:
 +
 +  lpoptions -xLaserjet-6P/instance1
 +
 +Printer instances set by root are global.
 +
 +Note that printer instances are not presented on the CUPS web interface.
 +
 +=== Printing Text Files From Windows Command Line ===
 +There are a number of obstacles to printing with specific option sets through Samba with CUPS:
 +
 +  - Samba appears to not support printer instances via the CUPS API. They simply do not appear as listed printers. Furthermore, attempts to specifically list a printer instance also do not work.
 +  - Any printer options set with ''lpoptions'' (see above) are ignored.
 +  - It may be possible to define a special printer, printing = sysv, and define a specific ''lp'' print command, but this would need a difference printer defined for each option set. Also, all the other print commands then also need defining in this section of ''smb.conf''.
 +
 +One solution is to give up on Samba and simply pipe the file to ''lpr'' on the print server using Cygwin ''ssh'' (or any other Windows ''ssh'' client). e.g.
 +
 +  type file | ssh cupsserver lpr -pLaserjet-6P -o cpi=11.5 -o lpi=6 -o page-top=33
 +
  
articles/cupsprinting.txt · Last modified: 2010/02/08 08:54 by timallen