Browse Prior Art Database

Automatic Determination of Binary Print Data Stream

IP.com Disclosure Number: IPCOM000036312D
Original Publication Date: 1989-Sep-01
Included in the Prior Art Database: 2005-Jan-28
Document File: 2 page(s) / 13K

Publishing Venue

IBM

Related People

Malcolm, JW: AUTHOR

Abstract

Application programs that print files now no longer need to have the user specify if the file is binary.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Automatic Determination of Binary Print Data Stream

Application programs that print files now no longer need to have the user specify if the file is binary.

ASCII text files contain certain binary codes that an application printing the file may need to interpret. The most common of these is the end-of-file (EOF) character. When the application encounters this character, normally it should stop reading and printing the file. The file length returned by DOS could be used instead of the EOF. However, some editors, when writing the file, round the file length up to the nearest sector boundary on the assumption that print programs will not read past the EOF.

Periodically, files to be printed will contain binary data. This data is usually control information for the printer or APA (all-points- addressable) graphics data. If by chance that binary data contained a x'1A' byte which is the EOF, the print program would stop, thinking it had encountered an EOF.

Assume the x'1A' will always mean EOF. The problem with this is that it will not work properly in the event of x'1A' in binary data.

Do not look for EOF, always assuming the file length is correct. The problem with this is that additional, unwanted trash data may be printed at the end of the file.

Forcing the user to specify the type of file (binary or ASCII). The problems with this are that it is a burden on the user and it does not allow for files that are a combination of binary data and ASCII.

Have the print program monitor the data stream looking for data stream prefixes that indicate binary data is to follow. Then, by building just enough intelligence...