Xref: utzoo comp.os.msdos.programmer:5826 comp.lang.c:40335 comp.sys.ibm.pc:55428 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!olivea!uunet!comp.vuw.ac.nz!cavebbs!frank From: frank@cavebbs.gen.nz (Frank van der Hulst) 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: <1991Jun22.080947.504@cavebbs.gen.nz> Date: 22 Jun 91 08:09:47 GMT References: <1991Jun21.040657.3195@ux1.cso.uiuc.edu> Organization: The Cave MegaBBS, Public Access Usenet, Wellington, NZ Lines: 22 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. I can post the code (its only about 10 lines) if you need it. Frank. -- Take a walk on the wild side, and I don't mean the Milford Track. Kayaking: The art of appearing to want to go where your boat is taking you.