Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Form Feed

Status
Not open for further replies.

colttaylor

Programmer
Aug 20, 2002
117
US
When printing to a laserjet from DOS, there are occasions when a previously running program will have left a few lines of text in the printer's buffer. When I send my reports to the printer, those lines of text get pre-pended to my report, throwing the page breaks off.
Currently, I get around this by sending a form feed before I start my report. My customers however do not like the blank sheet of paper which results when there is nothing in the print buffer prior to my report.
When I use a printer reset command instead of a form feed, then they blame me for the "missing" page which is lost when the print buffer resets.

Is there a series of printer control codes which will tell the printer to print the contents of the print buffer if there are any or do nothing if the print buffer is empty?

Thanks in advance!
Colt.
 
Rather than a formfeed, send <esc>E, a printer reset.

If the print buffer is empty, a blank page won't be
&quot;printed&quot;.

A PCL jobs should begin and end with a reset.
Jim Asman
jlasman@telus.net
 
This is more of a problem with the print job that leaves a partial page in the buffer. You fix that and your problem is fixed. Ed Fair
unixstuff@juno.com
Any advice I give is my best judgement based on my interpretation of the facts you supply. Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top