home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!alberta!ken
- From: ken@cs.UAlberta.CA (Huisman Kenneth M)
- Subject: sending escape codes to printer
- Message-ID: <1992Aug31.052400.15097@cs.UAlberta.CA>
- Keywords: printing escape codes amiga
- Sender: news@cs.UAlberta.CA (News Administrator)
- Nntp-Posting-Host: manning.cs.ualberta.ca
- Organization: University of Alberta, Edmonton, Canada
- Date: Mon, 31 Aug 1992 05:24:00 GMT
- Lines: 30
-
- I have a question about sending escape codes to a printer from a C program.
- how do you do it? I want a program I am writing to be able to change the
- printer setup. I've tried the following:
-
- FILE *printer;
-
- printer=fopen("prt:","w");
-
- fputs("\033\170\060"); /* send an escape sequence to printer */
-
-
- but for some reason the above doesn't work. It won't change the
- printer settings.
-
- with the above method, I CAN send ordinary text to the printer and have
- it print in the default mode, but it won't accept the escape code
- sequences for some reason (I know they are valid - I looked them up in
- my printer manual). Its almost like the escape sequences aren't even
- getting there.
-
- Is there something I am doing wrong? Is there a better way to do this?
-
-
- help would be appreciated, thanks.
- (email preferred)
-
- Ken
-
- ken@cs.ualberta.ca
-
-