HELP: Printing on remote printer via TCP/IP

HELP: Printing on remote printer via TCP/IP

Post by Brad Umme » Fri, 21 Sep 2001 01:20:50



I'm writing a piece of web-based software that is going to be used in a
doctor's in the area.  I need to be able to print from our remote server
directly to the postscript printer located in the doc's office.  I've been
told that this is possible, but not how to do it. ;)

Here's the setup:  Our server (with Linux/Apache/Perl/PHP) is off site (in
another state) and has a static IP address.  The doc's office is local and
is running a LAN, on which all of the computers and the printers have static
IP addresses relative to the LAN.  That is, they are all of the format
151.0.0.XXX (including the printer, which is 151.0.0.100).  If it matters,
the printer is a HP LaserJet 5 connected to a HP JetDirect port.  I also
know the static IP address coming into the LAN's router- for discussion
let's say it's "215.123.123.123".

I have almost no experience printing with Linux CLI (nor have I been able to
test any of this yet), so I'm just taking a stab at this from reading a
bunch of man pages.  My guess it that the first thing I need to do is set
the router in the doc's office to point a specific unused port (let's say
port 55) at the printer's local IP address.  Then I use lpr to send the
print job to the printer with syntax similar to:

lpr -P215.123.123.123:55 fileToPrint.ps

Am I on the right track?  Is lpr the right command to be using?  Is there
any authentication that I can set up so that only my server can print to the
printer?  Any help or references that you could point me to would be much
appreciated.  Thanks in advance.

 
 
 

HELP: Printing on remote printer via TCP/IP

Post by Lew Pitch » Fri, 21 Sep 2001 03:21:55



>I'm writing a piece of web-based software that is going to be used in a
>doctor's in the area.  I need to be able to print from our remote server
>directly to the postscript printer located in the doc's office.  I've been
>told that this is possible, but not how to do it. ;)

>Here's the setup:  Our server (with Linux/Apache/Perl/PHP) is off site (in
>another state) and has a static IP address.  The doc's office is local and
>is running a LAN, on which all of the computers and the printers have static
>IP addresses relative to the LAN.  That is, they are all of the format
>151.0.0.XXX (including the printer, which is 151.0.0.100).  If it matters,
>the printer is a HP LaserJet 5 connected to a HP JetDirect port.  I also
>know the static IP address coming into the LAN's router- for discussion
>let's say it's "215.123.123.123".

>I have almost no experience printing with Linux CLI (nor have I been able to
>test any of this yet), so I'm just taking a stab at this from reading a
>bunch of man pages.  My guess it that the first thing I need to do is set
>the router in the doc's office to point a specific unused port (let's say
>port 55) at the printer's local IP address.  Then I use lpr to send the
>print job to the printer with syntax similar to:

>lpr -P215.123.123.123:55 fileToPrint.ps

>Am I on the right track?  Is lpr the right command to be using?

Yes, you are on the right track, and yes, 'lpr' is the right command to use.

However, the -P parameter in lpr names a printer definition found in your local
/etc/printcap, and does not provide the printer IP address directly. You'll have
to edit your /etc/printcap to define each networked printer to lpr.

There are two HOWTO documents at the Linux Documentation Project
(http://www.linuxdoc.org/) that will be of use to you:
- The Printing HOWTO (http://www.linuxdoc.org/HOWTO/Printing-HOWTO/index.html),
- The Printing Usage HOWTO
(http://www.linuxdoc.org/HOWTO/Printing-Usage-HOWTO.html)

These documents show how to set up networked printers in Linux.

Additionally, HP has involved itself in a couple of OpenSource printer projects.
There are Linux print drivers for HP printers, and (IIRC) a JetDirect printer
client to make life easier. Take a look at HP's site (http://www.hp.com/) and do
a search for Linux and Jetdirect. A quick search that I did brought up
http://www.hp.com/cposupport/networking/support_doc/bpj06515.html
"HP JetDirect Print Servers - Linux, Configuring an LPD Queue Using Printtool or
a Printcap File"

Quote:>Is there
>any authentication that I can set up so that only my server can print to the
>printer?

There may be. It depends on the setup of the JetDirect printers.

Quote:>Any help or references that you could point me to would be much
>appreciated.  Thanks in advance.

Lew Pitcher
IT Consultant, Development Services
Toronto Dominion Bank Financial Group

(Opinions expressed are my own, not my employers')

 
 
 

1. Remote printing via TCP/IP

I have a problem that I am trying to solve for a client who wants to be
able to print to HP Laser printers and serial printers connected to
Emulex Performance 3000 buffers. I tried doing a 'mkdev rlp' and
configuring the printer, but I need to connect to a specific port on the
Emulex box for each printer and there does not seem to be any provision
for the Emulex box to queue jobs. Has anyone gotten a similar situation
configured and working?

I also know that the client has HP LaserJets with JetDirect cards that
put the printers directly on the ether. Does anyone know how these
connections work, and if there is any spooling provision in the printer's
network hardware?

If you feel that this will not be a general interest topic, I will
summarize any private e-mail that I get. Thank you for any help that you
can give me. Pointers to appropriate sections of the FM are also appreciated.

        -Greg V.

--

USnail: 87-B W. Hills Rd  |In-Touch Management Systems | Home:(516)385-7140
Huntington Sta., NY 11746 |Melville, NY 11747          | Work:(516)752-2701
.sig Version 0.4a(pre-beta release)           I thought, I wrote, I posted.

2. problem with ld.so.1 on Solaris 2.6

3. Printing to a remote TCP/IP printer

4. Gettin SSA Raidinfo into SSA Raidadapter

5. REQ HELP : Solaris printing to remote printers via DLC

6. How to extract single file from .rpm?

7. Help me connect a Compaq Pagemarq Printer via TCP/IP

8. What was the first version of Linux to support X?

9. HELP - remote printing using uucp and TCP/IP

10. !!DDE->TCP/IP, REAL TIME DATA PUMP, Trans.DDE App.DATA via TCP/IP