[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
- Subject: Re: Escape codes for printer control
- From: Elvis Pressly <elvisdman@HOTMAIL.COM>
- Date: Fri, 9 Mar 2001 18:08:44 -0000
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