Article View: alt.msdos.programmer
Article #652Re: stdprn and laser printers
From: Ronald E Garnett
Date: Tue, 29 Sep 1992 02:32
Date: Tue, 29 Sep 1992 02:32
43 lines
2226 bytes
2226 bytes
dalekim@Ingres.COM (FREEBIRD!) writes: >I'm using Microsoft C 6.0 to dump text to a printer using the 'fprintf' >statement to the stream 'stdprn.' The expected output is about 58 lines >long, and is followed by a form feed character. >This works fine for dot-matrix printers, but I've tried this on an HP >Laser Jet, and a Desk Jet, and they both eject a page with only 1 line >on it. >It works when I dump the text to a file, and then use a system call to >the 'print' command, but I'm interested in knowing why my original code >doesn't work correctly. Does anyone know what's happening, and how I >can correct it with a minimum of code changes? Thanks a lot. >Dale Kim >dalekim@ingres.com >ASK Computer Systems >Ingres Division First Guess: Is there a significant time period between writing lines to STDPRN (ie a few seconds)? If so, there could be a question of printer timeout. I don't believe that the HP's have a method of simply dumping out the hex characters they receive. But if they did, then you could run your program and see EXACTLY what the printers are getting. This might reveal an extra form feed or whatever! If you happen to have access to an IBM 4029 Laser Printer, then try using it instead (for testing purposes). It has a hex dump mode, and can show you every character that the printer gets. It's very handy when troubleshooting these things! A third idea is to find one of those little neat utilities for redirecting the standard LPT1 or STDPRN to a file. PC Mag has this in their utils I believe. If you could do this, it would hopefully be equivalent to the hex dump from the printer. Good Luck!! Ron Garnett, University of Illinois at Champaign-Urbana
Technical Details
Message-ID:
<rg9538.717733929@ehsn5.cen.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ehsn5.cen.uiuc.edu!rg9538References:
<1992Sep28.232457.8808@pony.Ingres.COM>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ehsn5.cen.uiuc.edu!rg9538 From: rg9538@ehsn5.cen.uiuc.edu (Ronald E Garnett) Subject: Re: stdprn and laser printers References: <1992Sep28.232457.8808@pony.Ingres.COM> Message-ID: <rg9538.717733929@ehsn5.cen.uiuc.edu> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Organization: University of Illinois at Urbana Date: Tue, 29 Sep 1992 02:32:09 GMT Lines: 44