Article View: comp.os.msdos.programmer
Article #7195Re: TC++ & DeskJet+ graphics programming: can't print '\x1a' !!??
From: Rob Kurver
Date: Sun, 23 Jun 1991 12:28
Date: Sun, 23 Jun 1991 12:28
24 lines
1728 bytes
1728 bytes
In <1991Jun22.080947.504@cavebbs.gen.nz> frank@cavebbs.gen.nz (Frank van der Hulst) writes:
>In article <1991Jun21.040657.3195@ux1.cso.uiuc.edu> mdcg7180@uxa.cso.uiuc.edu (Michael David Carr) writes:
}>I'm trying to print graphics on a DeskJet+, and am having no problems
}>except that I can't send ASCII 26 in a string of graphics bytes.
}>
}>Any help would be greatly appreciated (HP and Borland have no clue).
}The problem lies with TC++ (and TC and Turbo-Pascal going back at least 5
}years). The stdprn stream is opened as text mode, not binary, so a \x1A acts
}as an EOF character (just like a disk text file). You need to re-open stdprn
}in binary mode. I have code (elsewhere) which does this by doing a DOS call
}via int 21h (from vague memory) because TC won't allow you to change the
}device's mode.
Can't you just ignore stdprn and simply open a new stream to the printer in
binary mode?
Cheers. - Rob
--
PACT Rob Kurver
Foulkeslaan 87 rob@pact.nl
2625 RB Delft tel: +31 15 616864
The Netherlands fax: +31 15 610032
Technical Details
Message-ID:
<rob.677680082@dutncp8>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!mcsun!hp4nl!dutrun!dutrun2!dutncp8!robReferences:
<1991Jun21.040657.3195@ux1.cso.uiuc.edu> <1991Jun22.080947.504@cavebbs.gen.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!mcsun!hp4nl!dutrun!dutrun2!dutncp8!rob From: rob@pact.nl (Rob Kurver) Newsgroups: comp.os.msdos.programmer,comp.lang.c,comp.sys.ibm.pc Subject: Re: TC++ & DeskJet+ graphics programming: can't print '\x1a' !!?? Keywords: deskjet, tc++, c, c++ Message-ID: <rob.677680082@dutncp8> Date: 23 Jun 91 12:28:02 GMT References: <1991Jun21.040657.3195@ux1.cso.uiuc.edu> <1991Jun22.080947.504@cavebbs.gen.nz> Sender: news@dutrun2.tudelft.nl Followup-To: comp.os.msdos.programmer Lines: 24 Organisation: PACT, Delft, The Netherlands