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
tomb@hplsla.HP.COM (Tom Bruhns) (06/25/91)
hjanssen@cbnewse.att.com (hank janssen) writes: > I have a Laserjet III, and i wanted to write a programm that prints > 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 > 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. (Tried to email and it bounced...) I think you are not sending what the printer wants! Look carefully at the manual. I suspect an <ESC> is given as a _control_ [ ... That is, I suspect that you should be sending <esc>5j or something like that, though if that's the last (only) command of the string, I think the last char should be J not j. I looked in my LaserJetIIP manual, and found no commands that began with esc[, and in particular, that wasn't the command to change the orientation. It sounds a lot like the printer is getting the characters you are sending, but those aren't the characters that do what you think. I've been able to simply edit a file with QED, putting in the escape codes, etc., and copy that to PAR:, and everything comes out fine. That is, I can use that mechanism to select fonts, etc. Also, notice that I sent it to PAR: (could have been SER:), NOT to PRT:, which I think always filters things.