hjanssen@cbnewse.att.com (hank janssen) (06/20/91)
I have asked this question before, but our posting of news got hoosed so i am asking it again...... ---------- I have a Laserjet III, and i wanted to write a programm that prints stuff to it from intuition. (Yes i know that they are out there, but none of it does what i want it to do) I want to controll the printer by bypassing the printer.device from amiga and directly go to PRT: I have opened PRT with both Open and fopen. Sent some escape sequences just like the manual says is takes. And see it do _nothing_ Example a string like this. (THis is only an example) <ESC>[5j Will result on the prinout as: 5j It eats up my ESCAPE character and my [ character. while it should interped as something changing from landscap to portait. changing point size etc etc. Whatever escape sequence i sent the prnter it just prints it out minus the escape character. I have tried by sending the real escape Sequence character its octal and decimal value, but to no avail. Is there something i am doing basicly wrong. The ROM manual staes that when you open PRT: directly all is sent to the printer RAW. Does anybody have any idea that they like to share.???? Thanx, Hank Janssen, att!ihlpb!hjanssen
phil@adam.adelaide.edu.au (Phil Kernick) (06/20/91)
hjanssen@cbnewse.att.com (hank janssen) writes: >I want to controll the printer by bypassing the printer.device from >amiga and directly go to PRT: I am not sure you know what you are doing here, if you direct out put to the following names, you get these devices: Name Device PRT: printer.device SER: serial.device PAR: parallel.device The printer.device, translates all of the ANSI standard codes in your input stream and then sends these to either parallel.device or serial.device depending on which one you have specified that your printer is attached to in preferences. If you want to send raw bytes to the a printer on the parallel port, then you should send them to PAR: not PRT:. Hope this helps, Phil. -- o| /// Phil Kernick EMail: phil@adam.adelaide.edu.au |o | /// Departmental Engineer Phone: +61 8 228 5914 | o| \\\/// Dept. of Psychology Fax: +61 8 224 0464 |o | \/// University of Adelaide Mail: GPO Box 498 Adelaide SA 5001 |
peterk@cbmger.UUCP (Peter Kittel GERMANY) (06/20/91)
In article <1991Jun19.212436.14899@cbnewse.att.com> hjanssen@cbnewse.att.com (hank janssen) writes: > >I have a Laserjet III, and i wanted to write a programm that prints >stuff to it from intuition. (Yes i know that they are out there, but >none of it does what i want it to do) > >I want to controll the printer by bypassing the printer.device from >amiga and directly go to PRT: Hmm, to put it frankly: PRT: *IS* THE printer.device! And the driver! Perhaps you should just replace PRT: by PAR: (or SER:, respectively), then you really bypass all those drivers. >Example a string like this. (THis is only an example) > ><ESC>[5j > >Will result on the prinout as: > >5j > >It eats up my ESCAPE character and my [ character. while it should >interped as something changing from landscap to portait. changing >point size etc etc. When you talk to PRT:, it only regards valid ANSI escape sequences and intentionally trashes all others. >The ROM manual staes that when you open PRT: directly all is sent to the printer RAW. ^^^^ Please check again. If it really says so, it is a bug to be corrected. It should say PAR: or SER: for getting RAW output. -- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk
darrell@comspec.uucp (Darrell Grainger) (06/22/91)
In article <1991Jun19.212436.14899@cbnewse.att.com> hjanssen@cbnewse.att.com (hank janssen) writes: >I have a Laserjet III, and i wanted to write a programm that prints >stuff to it from intuition. (Yes i know that they are out there, but >none of it does what i want it to do) > >I want to controll the printer by bypassing the printer.device from >amiga and directly go to PRT: > >Example a string like this. (THis is only an example) > ><ESC>[5j > >Will result on the prinout as: > >5j > >Is there something i am doing basicly wrong. > Assuming the printer is connected to the parallel port you should be sending your output to PAR:, not PRT:. All output to PRT: is analyzed for ANSI X3.64 commands. An example of an ANSI X3.64 command would be <ESC>[1m this is convert to whatever Preferences states is the codes for Boldface on. So no matter which printer I have connected I just set the printer type in Preferences then <ESC>[1m turns Boldface printing on. It was designed to help programs. The program no longer has to worry which printer is connected... Preferences which convert the codes to what it thinks the printer wants. In your example of <ESC>[5j I can find no equivalent in the ANSI X3.64 list (see Appendix D, Printer Escape Codes in your Introduction to the Amiga manual) so <ESC>[ is probably pulled off then 5j is checked against the list of ANSI codes. None is found so the 5j is printed but the <ESC>[ (which I believe is called <CSI>) is filtered out. If you output to the PAR: it will use the parallel.device. PRT: uses the printer.device. > >Thanx, > >Hank Janssen, > >att!ihlpb!hjanssen -- Darrell Grainger % Comspec Communications Inc., Toronto, Ontario, Canada darrell@comspec % Disclaimer: All opinions expressed are my own. (416) 617-1475 % (416) 633-5605 (416)785-3553