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

Re: Escape codes for printer control



Elvis
Yes.
I've  not really use .lis files - But yes - A .lis file is a text file.

I am 99.999% certain that I am writing the correct escape charioteer into the 
ASCII file using:
    write ... char(27) ...

The problem is subsequently printing the ASCII text file which contains the 
escape character and control string.
The problem is that I cannot get the thing working even using DOS edit - I 
using this approach I know that I have the correct escape character and control 
string after checking the lower level HEX code.
I should be able to do this.
As such it is not a necessary requirement to create the escape character in the 
file using SQR .
Once I can get an ASCII text file to use embedded escape character and control 
string then I will have to do it from writing SQR.
However, I don't think that this is the case - Writing chr(27) look fine.

I am fairly sure that the issue relates to PostScript which uses a different 
escape character - However, I cannot get this to work either.

If you do find a solution please send let me know...

HP supplies all the escape codes - If you need this information let me know...

Andrew

----- Original Message ----- 
From: Elvis Pressly <elvisdman@HOTMAIL.COM>
To: <SQR-USERS@list.iex.net>
Sent: Friday, March 09, 2001 6:08 PM
Subject: Re: Escape codes for printer control


> HMMM... I got your point. You want to write into a file escape
> characters that will tell the printer that it is a printer command.
> This will look like a .lis file where you will use COPY function to print
> the file. Let me see, it has been a long while. I have to dig
> my libraries. I know I have done something similar like this but I
> believe I have to forced SQR to use HEX character value of the
> escape sequences..I'm not sure but I'll get back to you when I find
> that program.
> 
> >From: Andrew Rivers <andrew.rivers@CWCOM.NET>
> >Reply-To: sqr-users@list.iex.net
> >To: SQR-USERS@list.iex.net
> >Subject: Re: Escape codes for printer control
> >Date: Fri, 9 Mar 2001 17:29:23 GMT
> >
> >Elvis
> >Thanks for your comment on the issues with write and escape codes.
> >It is possible to create escape characters with write using the syntax:
> >     write 1 from chr(27) '&l1O'
> >
> >My problem is that I need to create the file as an ASCII text file.
> >For the application, an SPF file is not an option.
> >
> >I also neet to ensure that the ASCII file subsequently prints in landscape
> >using
> >the embeded escape charated/control sequence - i.e. The escape sequence in
> >the
> >ASCII file must override the any print settings.
> >
> >I belive that the problem is related to Postscript overriding any escape
> >charaters
> >other than those recognised by Postscript.
> >
> >If you have any other suggestions, I would be please to try.
> >
> >Andrew,
> > >
> > >I tested your printing methods and it does not like WRITE.
> > >
> > >In SQR we always use PRINT to tell the printer it is a command.
> > >PCL commands are case sensitive and should end with a capital letter.
> > >You can also combined commands as long as they have the reset
> > >escape char <27> or <39> in other platforms. We have used PCL a lot
> > >and have never encounter any problems. Here some example of how to
> > >switch from Portrait to Landscape and vice versa>
> > >
> > >encode <27>E  = reset the printer
> > >  plus  &l1O  = landscape
> > >  plus  <27>&l3A = legal
> > >
> > >So I want to print in legal size paper and landscape, all I need
> > >to do is issue the following command before printing:
> > >
> > >  encode <27>E<27>&l1O<27>&l3A into $Landscape
> > >  print $landscape () ....or you can also use
> > >  print $landscape () code-printer=HPLASERJET
> > >
> > >             OR
> > >
> > >  encode <27>E<27>&l0O<27>&l3A into $Portrait
> > >  print $Portrait () ....or you can also use
> > >  print $Portrait () code-printer=HPLASERJET
> > >
> > >
> > >>From: Andrew Rivers <andrew.rivers@CWCOM.NET>
> > >>Reply-To: sqr-users@list.iex.net
> > >>To: SQR-USERS@list.iex.net
> > >>Subject: Re: Escape codes for printer control
> > >>Date: Fri, 9 Mar 2001 14:50:48 GMT
> > >>
> > >>Dennis
> > >>Many thanks.
> > >>However this is not the resolution of my problem.
> > >>I am able to create the required escape contol character.
> > >>    write 1 from chr<27> '&l1O'
> > >>does exactly the same thing as
> > >>    encode '<27>' into $landscapeEscChar
> > >>    write 1 from $landscapeEscChar '&l1O'
> > >>
> > >>The problem come with the actual printing of the ASCII text file.
> > >>
> > >>This issue resolves around the way Postscip ignores escape characters
> >other
> >
> > >>than Postscript control characters,
> > >>
> > >>Again many thanks for your input.
> > >>
> > >>Andrew
> > >>
> > >>***********************************************************
> > >>
> > >> >I had a similar problem a week ago. Everyone I asked suggested that I
> > >>used
> > >>
> > >> >the  ENCODE instruction. Maybe, this  could help you.
> > >> >
> > >> >Look at this:
> > >> >
> > >> >      ENCODE
> > >>
> > 
>>'<27>&l12d0e0o1x1s<27>&a1g<27>&a0r<27>&f0s<27>&f1000y3x<27>&f1s<27>(s4099<27
> >
> > >>
> > >> >>(s15h<10>' into $INIT
> > >> >      ENCODE '<27>&a' into $ROW
> > >> >      ENCODE '<27>=' into $HALF_LINE
> > >> >      IF $EMPLID_OLD <> ''
> > >> >         NEW-PAGE
> > >> >      END-IF
> > >> >      PRINT $INIT               (,)
> > >> >      PRINT $ROW                (,)
> > >> >      PRINT '3R'                (,)
> > >> >
> > >
> > >_________________________________________________________________
> > >Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com