User Tools

Site Tools


it_services:pf:printing

Printing

:!: this page is WORK IN PROGRESS. Sorry for the inconvenience. Some items may change after we move, and possibly the whole page will be moved. :!:

Printing is provided via a cups print server at cups.hep.lu.se . For the moment it is possible to connect machines directly to the printer, provided they belong to known networks (the cabled network or eduroam) but in the future this may not be possible. The reasons are due to national rules of accessing public IT services and are described in this security article: https://www.it.lu.se/it-sakerhet/it-sakerhetsartiklar/sakerhetskonfiguration/

Detailed instructions on how to connect your machine directly to the printer will not be given here but they are available upon request in case the connection between your machine and the print server does not work as it should.

Currently the setup is as follows:

  • For machines connected to the network via cable, there is no need for authentication.
  • For machines connected via wireless, authentication using your particle physics login (also known as “teddi login”) is required.

About the available printers

The following print queues are available from the Linux computers:

Queue Name Duplex Colour Paper size Location Notes hostname
lw1 Yes No A4 Room A404 lw1.hep.lu.se
copy Yes Yes A4 Room A404 copy.hep.lu.se

The printer lw1, is the default printer. It will be used if no printer is specified.

How to print

Using a graphical interface

Nowadays most of printing from workstations can be done via graphical tools. Most operating systems have their own intuitive tools, so these will not be described here.

Using the command line (Linux or Apple)

List available printers
lpstat -a
tjatte:~> lpstat -a
clw1 accepterar begäran sedan tor 27 mar 2014 15.56.09
clw1_trans accepterar begäran sedan mån 31 mar 2014 06.33.55
clw2 accepterar begäran sedan mån 31 mar 2014 13.36.56
lw1 accepterar begäran sedan mån 31 mar 2014 11.08.59
lw4 accepterar begäran sedan mån 31 mar 2014 10.03.26
Ricoh accepterar begäran sedan tis 25 feb 2014 20.23.31
Standard usages

To print a document “file.ps” to the default printer, use

lpr file.ps

To print to another printer (newprinter in this example) use

lpr -P lw1 file.ps

To see what is in the print queue

lpq
lpq -P copy

To remove all your printouts from the queue

lprm -
lprm - -P copy
Duplex/simplex

Printers that are able to print duplex, do that by default, and are flipping the page along the long edge. To print in simplex (only on one side of the paper)

lpr -o sides=one-sided file.ps

To print on both sides and flip along the short edge

lpr -o sides=two-sided-short-edge file.ps

To print on both sides and flip along the long edge (default)

lpr -o sides=two-sided-long-edge file.ps
lpr -o page-ranges=4 file.ps
lpr -o page-ranges=1-8 file.ps
lpr -o page-ranges=1,3,6 file.ps
Pretty printing
lpr -p file.ps

or

lpr -o prettyprint file.ps

Specifies that the file should be formatted with a shaded header with the date, time, job name, and page number. This option is only useful when printing text files.

To print two pages on each side of the paper

lpr -o number-up=2 file.ps

And to get in even more on the paper

lpr -o number-up=4 file.ps

You can also use 8 and 16. But can you read it?

Rotate

To rotate the page 90 degrees and print it in landscape orientation

lpr -o landscape file.ps

In most cases it is better to create the file in landscape orientation.

Mirroring
lpr -o mirror file.ps

Might be useful if you want to print something that Leonardo D. has written.

Combining options

You can combine the options, like in the following example

lpr -P lw1 -o prettyprint -o number-up=2 file.ps
Other useful utilities

ps2ps can do a lot of tricks on a postscript-file. It is used in the background of the printing system to handle many of the options above, but can be used directly on a file. ps2ps can sometimes be used to “clean up” ps or eps files originating from other systems. psbook is useful to rearrange the pages in a ps-file in such a way that when printed, you can fold the papers around the middle, and you have got a book. Or at least a booklet. Se man psbook for more information. gv or ghostview, is the number one program to check a ps-file before printing it. It can save many trees

To check the print server status

On the Linux system the printing is handled by a central print-spooler. The spooler queues, format (if necessary) and send the file to the printer. The spooler is in our case called cups. In the normal case the file you want to print should be a postscript-file or a pdf.

It is possible to print files that are not in postscript. One typical format is “text”, but even a lot of other formats is possible. The spooler takes care of the file, and try to do its best to convert it to postscript before it is sent to the printer. However, in most cases, I recommend that you convert the files to postscript yourself.

The print server status can only be seen when connected via cable or eduroam.

Click this link: https://cups.hep.lu.se:631/ and login with your teddi credentials if asked.


Installation

Get to the print room where the printer is located and note the printer Model Name and hostnames. You will need those later.

GNU/Linux

Use your printer system configurator to add the printer. It may vary depending on distributions.

  1. When asked for the printer, choose to add a network printer and type in the URL:
    ipps://cups.hep.lu.se:631/printers/<printername>

    e.g.

    ipps://cups.hep.lu.se:631/printers/lw1
    ipps://cups.hep.lu.se:631/printers/copy
  2. Repeat step 1 for each printer you want to add.
    • lw1 should not require drivers, as they are provided by the standard CUPS server library on every Linux.
    • For copy you will need to install the drivers. See Drivers
  3. Test with lpstat -a, you should see the list of configured printers.
  4. Print a test page. If connected via wireless you will be asked for username and password.

Windows

  1. Go to Printers and Faxes and choose Add a new printer. Select The printer isn't listed as soon as it is visible.
  2. When asked for a new printer, select network printer (TCP/IP)
  3. Add the printer using this URL:
    https://cups.hep.lu.se:631/printers/printername

    e.g.

    https://cups.hep.lu.se:631/printers/lw1
    https://cups.hep.lu.se:631/printers/copy
    • You will be asked for drivers. If you're lucky, they're on Windows Update, if you're not, find them yourself by looking at the vendor's website. I have some downloaded already and I provide them here: Drivers
    • When the drivers have been installed, you should be able to use the printer.
  4. Print a test page. If connected via wireless you will be asked for username and password.
  5. Repeat these steps for each printer you want to add.

MacOS X

Drivers needs to be installed (to download them see Drivers) by copying them in the /Library/Printers/PPDs/Contents/Resources/ folder. More info about this may come.

Once drivers are installed:

  1. Go to System preferencesPrinters and Scanners → add the advanced printer configuration tab this way:
    1. ctrl + click on free space under add printer to customize toolbar
    2. Add advanced by drag & dropping it to the bar with other print configuration option
  2. Click on the advanced button just added
  3. To add each printer, fill the URL with the following strings:
    • lw1:
      ipps://cups.hep.lu.se:631/printers/lw1?compression=gzip
    • copy:
      ipps://cups.hep.lu.se:631/printers/copy
  4. Add printer name (please use either lw1 or copy) and description (description is optional)
  5. select drivers:
    • for lw1: HP PCL 4/5 if no driver installed, otherwise pick HP m600/601/602 (TODO:CHECK)
    • for copy: Pick Canon iR-ADV C275 (TODO:CHECK)
      • select options: “feeding unit AK1”
  6. Repeat the process for each printer

Known Issues


Q: I cannot print via wireless. The printer dialog is stuck with the message “Hold for Authentication”

A: Wireless printing requires login due to general security and enforced national rules. It is now possible to print via wifi by using your Particle Physics account also known as “teddi” account (see https://www.hep.lu.se/staff/paganelli/doku.php/it_services:pf#accounts)

In order to insert your login credentials, you need to click on the small round arrow next to the print dialog as in the picture below: Then you will be prompted for your username and password.


Drivers

They can be found on teddi or the shared storage at this path:

/nfs/windows/drivers/printers

Otherwise search for the printer name on respective vendor websites.

lw1: HP Laserjet 600 M602 - https://support.hp.com/se-sv/drivers/selfservice/hp-laserjet-enterprise-600-printer-m602-series/5145285/model/5036604

  • For Linux these drivers are available in the hplip package on common distros, no need to download.

copy: Canon imageRUNNER ADVANCE DX C257i - https://www.canon.se/support/business/products/office-printers/imagerunner/advance-dx/imagerunner-advance-dx-c257i.html?type=drivers&os=all

it_services/pf/printing.txt · Last modified: 2023/08/02 08:00 by florido

Accessibility Statement