[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Escape codes for printer control



Hi
I need to control the printing of ASCII text files written from SQR routines
using an escape sequence.

Platform:        NT4
Printers:        HP Laserjet 5/ a range of other HP Dotjet printers
Communications:  All printers on network

To change to landscape I am using the control string:
  Ec&l1O       Where Ec is the escape charater (Backward facing arrow)

Clarification of charaters in the control string:
  chr(27) (&) (Lower case letter: L) (Number: 1) (Upper case letter: O)

In denary:
  027 038 108 048 079 (111)

In HEX:
  1B 26 6C 30 4F (6F)

HP Support confirms that I am using the correct control string.

I can create the control string in Notepad, DOS and from by writing to a text
file using SQR using the escape character char(27).

However, I am unable to get the file to print in landscape whater the process
of printing:
   i.e. Notepad; DOS edit; Direct from file in Explorer

Examination of byte sequence confirmed that the HEX code of the HP printer 
control
string for landscape [ 1B 26 6C 30 4F (6F) ]is correct.

I believe the the issue may be because the file is wrapped for Postscript.

I have tried Postscript escape characters ^[ ^]around the HP landsacpe control
string, i.e.
   ^[Ec&l1O^]      Where Ec&l1O is defined above.

HP has been unable to resolve the issue.
HP said that it is not possible for the control escape charater to be switch
off on their printer - So it is not an issue with printer setup.

If any one is able to resolve the problem - Or make any suggestions to try then
I would be most grateful.

It would be useful to use many of the HP pronter control strings in our 
applications.


Many thanks

Andrew