SDB:Printing via TCP/IP network

Şuraya atla: kullan, ara


Request:

You want to print to a printer that meets one of the following conditions:

  • the printer is locally connected to another computer and the other computer is accessible via TCP/IP network
  • the printer is locally connected to a print server box and the print server box is accessible via TCP/IP network
  • the printer has a built-in TCP/IP network interface and the printer is accessible via a TCP/IP network

You want to perform a prefiltering of the print jobs.

Procedure:

Since SuSE Linux 8.0, see the "Reference" manual.

Names:

Another computer in the TCP/IP network to which the printer is locally connected to is a print server.
A special device with one TCP/IP network connection and one or more parallel connections for parallel printers is called a print server box.
A printer with a built-in TCP/IP network interface is called a network printer.
The computer where the print job is started (using the command lpr file) is the client.

The different cases:

The main differences between the following cases is the point where the filtering of the printing jobs is performed. As network printers and print server boxes cannot run the apsfilter, the filtering has to be performed on the client computer if a network printer or a print server box is used. If a print server is used, the filtering can be done either on the client or on the print server. Therefore, the following cases exist:

  • network printer with filtering on the client:
    1. client: file -apsfilter-> printer data
    2. client: printer data -remote-> network printer
  • print server box with filtering on the client:
    1. client: file -apsfilter-> printer data
    2. client: printer data -remote-> print server box
    3. print server box: printer-data -> printer
  • printer connected to a print server with filtering on the client:
    1. client: file -apsfilter-> printer data
    2. client: printer data -remote-> print server
    3. print server: printer data -> printer
  • printer connected to a print server with filtering on the print server:
    1. client: file -remote-> print server
    2. print server: file -apsfilter-> printer data
    3. print server: printer data -> printer

"-remote->" indicates a print queue that does not perform any filtering, but just forwards the data -- a "forwarding queue". "-apsfilter->" indicates a print queue that performs filtering. If the filtering is performed on the client, this print queue is called a "prefilter". If the filtering is performed on the print server, this printer queue is one of the normal print queues at the print server, such as lp or ascii.

Prerequisites:

The printer must be supported by SuSE Linux because the prefilter produces the printer data the same way (normally via Ghostscript) as for a locally connected printer. Regarding the parameters for the prefilter configuration (e.g., the Ghostscript driver), see the article SDB:Installing a Printer

  • Basic network functionality -- at the client
    ping print server, ping print server box, or ping network printer must work.
  • If you use a print server, this print server must be able to resolve the name of the client (for that, at least the client's IP address and name must be in the file /etc/hosts on the print server). ping client name
    must work from the print server.
  • If you use a print server, the printer must work properly if you print directly from the print server.

Configuration of the printer forwarding queue on the client:

Log in as root on a text-based console. If you use the graphical interface, switch to a text-based console using [Ctrl]+[Alt]+[F2]. (With [Alt]+[F7], you can switch back to the graphical interface.)

  1. Enter either /var/lib/apsfilter/SETUP or lprsetup
  2. Press the RETURN key to get the APSFILTER SETUP menu
  3. Choose ENTRY, DEVICE, and REMOTE
  4. Enter the IP address of the network printer, print server box, or print server.
  5. Enter the name of the print queue at the network printer, print server box, or print server. If you use a network printer or a print server box, find the possible print queues in the manual of the device. If you use a print server, enter one of the print server's print queues (e.g., lp or ascii).
  6. Choose ADD
  7. Press the RETURN key to continue
  8. Choose RETURN and EXIT

Now the print queue "remote" is installed on the client. After you restart the print daemon on the client with rclpd stop and rclpd start, the print queue "remote" is available on the client. With the command lpr -Premote file, the file will be sent without filtering to the network printer or the print server box.

If the printer is connected to a print server, enter the IP address of the client in the file /etc/hosts.lpd on the print server.
After restarting the printer daemon on the print server, it accepts printing jobs from the entered client.

If the printer is connected to a print server with filtering on the print server, the configuration is completed here.

Configuration of the prefilter on the client:

  1. Start lprsetup
  2. Press ENTER
  3. Choose ENTRY, DEVICE, and PREFILTER one after the other
  4. Choose the print queue "remote" you just prepared
  5. Choose PRINTER
  6. Select the apropriate entry from POSTSCRIPT, HEWLETT-PACKARD, OTHER, or FREEDEF
  7. Choose COMMIT
  8. Scroll the list and select the correct Ghostscript driver or the suitable parameter file then choose OK
  9. Enter the correct resolution and choose OK
  10. Choose RETURN and PAPER one after the other
  11. Choose the suitable paper size then OK
  12. Choose COLOR
  13. Choose MONO or COLOR and then OK
  14. Choose ADD
    Now you get an output about which prefilter spooling queues were created on your system at the apsfilter configuration. Note which prefilter spooling-queues were created. Then choose OK.
  15. Press ENTER to go on
  16. Choose RETURN and EXIT one after the other

After you restart the printer daemon on the client with rclpd stop and rclpd start, the new prefilter spooling queues on the client are available. With the command
lpr -Pprefilter-spooling-queue file
send the file to the mentioned prefilter spooling queue. It is transformed by the apsfilter into printer data and forwarded to the "remote" queue then to the network printer, the print server box, or the print server.

Background information:

The printer forwarding queue and the prefilter queue cannot be merged, because the printer daemon lpd (from package "lprold") ignores filter entries in case of remote printer queues in /etc/printcap. For the prefiltering, an additional queue is needed.

In case of problems:

Checking the configuration of the prefilter

Connect the printer directly to the first parallel port of the PC and configure the printer as local printer for testing purposed to exclude problems regarding the network. Proceed as described in the support database article SDB:Installing a Printer

If the printer works this way, you know the appropriate Ghostscript driver and other parameters for the configuration of the prefilters. Now install you printer in the network as described above.

Network printer or print server box does not work reliably

Sometimes problems with the print spooler on a print server box or a network printer occur, especially if several clients send print jobs to the print server box or the network printer at the same time. In this case, the print spooler may get confused. Because of the fact that this depends on the print spooler in the print server box or in the network printer, it is almost impossible to solve such problems. Generally, it is recommended to connect the printer directly to a print server.

Nevertheless, you can make improvements with the following procedure:
One computer acts as print server for the print server box or the network printer. All clients send the print jobs to this print server and just this print server manages the spooling of the print jobs and sends them to the print server box or the network printer.

The filtering can here also take place on the client or the print server. Therefore, the following cases exist:

  • network printer at the print server with filtering on the client:
    1. client: file -apsfilter-> printer data
    2. client: printer data -remote-> print server
    3. print server: printer data -remote-> network printer
  • print server box at the print server with filtering on the client:
    1. client: file -apsfilter-> printer data
    2. client: printer data -remote-> print server
    3. print server: printer data -remote-> print server box
    4. print server box: printer data -> printer
  • network printer at the print server with filtering on the print server:
    1. client: file -remote-> print server
    2. print server: file -apsfilter-> printer data
    3. print server: printer data -> network printer
  • print server box at the print server with filtering on the print server:
    1. client: file -remote-> print server
    2. print server: file -apsfilter-> printer data
    3. print server: printer data -> print server box
    4. print server box: printer-data -> printer

The configuration of the individual spooling queues is comparable to that mentioned above.

SDB:Installing a Printer

<keyword>printing,printer,networkprinter</keyword>