[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



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