|Ahost||string||Name of the domain or IP address of the printer server.|
|Aport||string||Port number of the remote machine by which the print daemon listens. If we do not use this attribute, the command performs the send to the port 515.|
|Auser||string||Name of the user owner of the print job.|
|Aqueue||string||Name of the print queue.|
|Adocname||string||Name of the document to print.|
|Aprtcode||string||Code of the printer defined in the table wic_sysprtdev of the BD wic_conf.|
|Null||In case of not indicating the host, queue or printer port by default, the system interprets which it is the connected user.|
lpr already in use, close it first
A communication LPR is not possible to establish with the printer because there is one in process (for the same host, user and queue).
no active lpr connection
The communication LPR is not possible to obtain with the printer because there is no one established.
The name of domain or the specified IP address is not valid.
In case of not indicate the host, queue and printer port by default, the system interprets which it is the connected user.
This communications are performed through the protocol based in TCP Line Printer Daemon Protocol. A daemon is a Unix/Linux program which is executed in second plan permanently, waiting to receive remote petitions to lend a certain service.
To print documents in PDF format, The configuration of tge printer should be performed in the printer manager. In the case of platforms Unix/Linux dispose of the CUPS (Common Unix Printing System). You should register the printer informing the brand and the mode, getting that every time a document arrives in the print queue in a format recognized (PDF), CUPS performs the conversion to the language interpretable by the print device (PCL, PS).
Setting of CUPS:
Before start the setting of CUPS, you should check that the printing of the operating system using the lpr command, works correctly. This test should be performed both from the print server itself, as from another computer in the network (against the print server queue).
- CUPS dispose of a web application which allows to manage the printers, accessible through the URL http://localhost:631. 631 is the port by default, it exist the possibility to change it through the file /etc/cups/cupsd.conf.
- Once in the main menu, you should select the option administration tasks and later, click the button Add printer. Next, the fields to inform that are shown in the successive pages and their respective values are shown (for example):
- Name: hplj_3330
- Location: Administración
- Description: Hewlett-Packard LaserJet 3330
- Connection: LPD/LPR Host or Printer
- connection URL: lpd://192.168.10.200/RAW
- Producer: HP
- Model: HP LaserJet Series Postscript
http://www.ietf.org/rfc/rfc1179.txt - RFC 1179 - Line Printer Daemon Protocol.
Send to print a newly created text file
<xsql-script name='lpr_sample1'> <body> <set name='m_file'><file name='data.txt' /></set> <file.out.open id='out1'><m_file /></file.out.open> <file.out.print id='out1'>Hello world</file.out.print> <file.out.close id='out1' /> <lpr host='w2ksrv1' user='dvt' queue='hplj_3330'> <lpr.sendFile><m_file /></lpr.sendFile> </lpr> </body> </xsql-script>