FTP Printing

Introduction

FTP (File Transfer Protocol) is a basic TCP/IP connectivity utility to transfer data between systems. FTP printing is a way to use FTP to send print files from a client system to an HP Jetdirect-connected printer. In an FTP printing session, the client connects and sends a print file to the HP Jetdirect FTP server which in turn passes the print file to the printer.

The HP Jetdirect FTP server can be enabled or disabled through a configuration tool, such as Telnet (see TCP/IP Configuration) or the embedded web server (see Using the Embedded Web Server).

Requirements

FTP printing described here requires the following:

• HP Jetdirect print servers with firmware version x.20.01 or later.

• TCP/IP client systems with FTP that complies with RFC 959.

Note For the most recent list of tested systems, visit the HP Customer Care Online at

http://www.hp.com/support/net printing

Print Files

The HP Jetdirect FTP server transfers print files to the printer but does not interpret them. For proper printing, print files must be in a language recognized by the printer (such as PostScript, PCL, or unformatted text). For formatted print jobs, you must first print to a file from your application using the driver for the selected printer, then transfer the print file to the printer through an FTP session. For formatted print files, use binary (image) type transfers.

Using FTP Printing

FTP Connections

Similar to standard FTP file transfers, FTP printing uses two TCP connections: a control connection and a data connection.

Once an FTP session is opened, it remains active until either the client closes the connection or the data and control connections are idle for a time that exceeds the idle timeout period (default is 270 seconds). The idle timeout can be set through various TCP/IP configuration tools, such as BOOTP/TFTP, Telnet, printer's control panel (see TCP/IP Configuration), the embedded web server (see Using the Embedded Web Server), or management software.

Control Connection

Using standard FTP, a control connection is opened by the client to the FTP server on the HP Jetdirect print server. FTP control connections are used to exchange commands between the client and the FTP server. The HP Jetdirect print server supports up to four control connections (or FTP sessions) simultaneously. If the number of allowed connections is exceeded, a message indicating that service is not available will be displayed.

FTP control connections use TCP port 21.

Data Connection

A second connection, a data connection, is created each time a file is transferred between the client and the FTP server. The client controls the creation of a data connection by issuing the commands that require a data connection (such as FTP ls, dir or put commands).

Although the ls and dir commands are always accepted, the HP Jetdirect FTP server supports a single data connection for printing at a time.

The transmission mode for an FTP data connection with the HP Jetdirect print server is always in stream mode, which marks the end-of-file by closing the data connection.

Once a data connection is established, the file transfer type (ASCII or binary) can be specified. Clients may attempt to autonegotiate a transfer type, and the default transfer type depends on the client system (for example, Windows NT may default to ASCII, while UNIX may default to binary). To specify the transfer type, enter the bin or ascii command at the FTP prompt.

FTP Login

To start an FTP session, enter the following command from a MS-DOS or UNIX command prompt:

ftp <IP address>

where <IP address> is the valid IP address or node name configured for the HP Jetdirect print server. See FTP Login Example

Figure 5.1

Figure 5.1

FTP Login Example

If the connection is successful, a Ready message will be displayed.

After a successful connection, the user is prompted for a login name and password. The default is the client's login name. The Jetdirect FTP server will allow any user name. Passwords are ignored.

If login is successful, a message "230" will be displayed on the client system. In addition, the available HP Jetdirect ports for printing will be displayed. HP Jetdirect internal print server cards provide a single port (Port 1). HP Jetdirect external print servers with multiple ports will display all available ports, with Port1 the default port. To change ports, use the FTP cd (change directory) command. For a typical FTP printing session, see "Example of an FTP Session."

Ending the FTP Session

To end an FTP session, type quit or bye.

Note Prior to ending an FTP session, a [Ctrl-C] command is recommended to ensure the data connection is closed.

Commands

User Commands for HP Jetdirect FTP Server summarizes commands available to the user during an FTP printing session.

Table 5.1 User Commands for HP Jetdirect FTP Server

Command

Description

user <username>

<username> specifies a user. Any user will be accepted and can print to the selected port.

cd <port#>

<port#> selects a port number for printing. For HP Jetdirect singleport print servers, only port1 is available. For multiport print servers, specify port1 (default), port2, or port3.

cd /

/ specifies the root directory of the HP Jetdirect FTP server.

quit

quit or bye terminates the FTP session with the HP Jetdirect print server.

bye

dir

dir or ls displays the contents of the current directory. If this command is typed in the root directory, a list of available ports for printing is displayed. For multiport print servers, the available ports for printing are PORT1 (default), PORT2, and PORT3.

ls

pwd

Displays the current directory or the current Jetdirect printing port.

put <filename>

<filename> specifies the file to send to the selected HP Jetdirect print server port. For multiport print servers, a different port can be specified in the command: put <filename> <port#>

bin

Configures an FTP binary (image) file transfer.

ascii

Configures an FTP ASCII file transfer. HP Jetdirect print servers support only non-print format control for character transfers (standard values for spacing and margins are used).

[Ctrl-C]

Press the [Ctrl] and [C] keyboard keys simultaneously to abort the FTP service command and any transfer of data. The data connection is closed.

rhelp remotehelp

This command depends on your client system (use rhelp on UNIX, or remotehelp on Windows NT/2000) and displays a list of FTP system commands supported by the print server. (Note: the commands displayed are not user commands. User-accessible commands depend on the client's FTP system.)

Example of an FTP Session

This is an example of a typical FTP printing session: C:\> ftp i92.l68.45.39

Connected to 192.168.45.39.

22 0 JD FTP Server Ready

001 Username Ok, send identity <email address> as password

Password:

230- Hewlett-Packard FTP Print Server Version 2.0

Directory: Description:

PORT1 Print to port 1 HP color LaserJet 4500

To print a file, use the command: put <filename> [portx]

or cd to a desired port and use: put <filename>.

Ready to print to PORT1

23 0 User logged in. ftp> pwd

257 "/" is current directory. <"default port is : /PORT1> HP Color LaserJet 4500"

ftp> cd porti

250 Changed directory to "/PORT1" ftp> pwd

257 "/PORT1" is current directory. "HP Color LaserJet 4 500"

ftp> bin

200 Type set to I. Using binary mode to transfer files.

ftp> put d:\atlas\temp\ftp_test.ps

200 PORT command successful.

150 Opening BINARY mode data connection

22 6- Ready

226- Processing job

226 Transfer complete

31534 bytes sent in 0.04 seconds <788.35 Kbytes/sec>

ftp> quit

221 Goodbye

Bark to:

0 -1

Post a comment