Why is LPR Byte Counting Enabled required?

Question:

RPM does not receive print jobs from the Windows Standard TCP/IP Port unless the LPR Byte Counting Enabled option is selected. What is "LPR byte counting" and why must it be selected?

Answer:

"LPR byte counting" forces Windows to count the number of bytes in the file and send this value in the Receive data file subcommand. To understand why this does not work, you must first understand the steps in sending a print job using the LPR/LPD protocol.

  1. The LPR client sends the Receive a printer job command.
  2. RPM replies with an acknowledgment (ACK).
  3. When the LPR client receives the ACK, it can proceed. The client then sends the Receive control file subcommand.
  4. When the LPR client receives an ACK from RPM, the control file is sent. RPM will then respond with another ACK.
  5. The LPR client now sends the Receive data file subcommand. The size must either be set to the actual size of the data file, or set to 0. This is one area where Microsoft does not follow the protocol specifications.
  6. When the client receives the ACK, it will send the data file. Once the data file has completed, the connection is closed by both parties.

When LPR byte counting enabled is turned off, Microsoft sets the <file size> to a size much larger than the actual size. It is set neither to 0 nor the actual file size. When RPM receives a file much smaller than the specified file size, RPM believes that the entire file was not sent, deletes the "incomplete" file, and waits for the file to be sent again.

The RFC1179 specifications state that you may set the size of the data file to 0, however, it does not discuss how the LPD Server should handle this "unknown length file". RPM handles the "unknown length file" situation by receiving all data from the request to send the data file until the connection is closed by the LPR client.

RPM can also handle the opposite situation, in which the file is actually 0 bytes. You tell RPM to close the connection after a specified amount of time.

To do this, follow these instructions.

  1. Choose LPD Options from the Options menu.
  2. Select Enable zero length file transfers. 600 seconds is the default amount of time to wait, however, you may raise or lower this value to meet your needs.

 

Article 212-01

Issue: Printing
Topic: Protocols

Did this information answer your question?

Your email address (optional):

Please provide additional comments. We welcome your feedback.

Case Studies
Satisfied customers using Brooks' software in their print environments to simplify document workflows.
 
 
IPDS Printing
Print IPDS files to any of your PCL-supported printers for ONLY $495!
 
 
Host to Windows
White Paper  Simple tools for connecting IBM-based data with the Windows® world
 
 
Print to File
RPM writes to disk incoming data from ANY host system, checks for duplicates...
 
 
AS400 Printing
RPM applies all the features of Windows printing to your AS/400 (iSeries / zSeries) spool files
 
 
UNIX to Windows
RPM enhances UNIX print services' ability to customize and control processing