For Programmers: Free Programming Magazines  


Home > Archive > Clipper > November 2004 > Urgent: Escape sequences for laser printer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Urgent: Escape sequences for laser printer
Drazen

2004-11-22, 8:55 pm

Hi!
Well, my old application written in clipper must now print on IBM Infoprint
12 laserjet printer. PCL Font list have array of escape seqeunces
for every font, but i don't understand every character or sign in that
escape sequnces.
For example:

<Esc>( "here is empty rectangle" <Esc>(s0p here is another rectangle with
shape h0s0b4099T .

Ok, problem is (confuse me a chr( ) code for that rectangles???): How I can
write this command in clipper?
Normally is : ?chr(27)+"(" ??? +chr(27)+"(s0p"+ ??? + "h0s0b4099T"

Symbol set on printer is set to PC-852.

Thx


Klemens Lichter

2004-11-22, 8:55 pm

Hi,
please check

http://pcl.webs.com.ua/pcl/pcls/bpl.html

there you will find a list of common PLC commands and how they are used. In
some commands there is a # within the command and this # you have to replace
with a value maybee the fontsize in points or paper size or something else.
This values you donīt set in ASCII but in characters, so if you have to set
a point size of 10 your command is ESC(s#V where # = 10 = chr(49)+chr(48) so
your whole commandstring to send to the printer is
? chr(27)+"(s10V"

HTH
Klemens


"Drazen" <app@euronet.hr> schrieb im Newsbeitrag
news:cntim0$38c$1@ls219.htnet.hr...
> Hi!
> Well, my old application written in clipper must now print on IBM

Infoprint
> 12 laserjet printer. PCL Font list have array of escape seqeunces
> for every font, but i don't understand every character or sign in that
> escape sequnces.
> For example:
>
> <Esc>( "here is empty rectangle" <Esc>(s0p here is another rectangle with
> shape h0s0b4099T .
>
> Ok, problem is (confuse me a chr( ) code for that rectangles???): How I

can
> write this command in clipper?
> Normally is : ?chr(27)+"(" ??? +chr(27)+"(s0p"+ ??? + "h0s0b4099T"
>
> Symbol set on printer is set to PC-852.
>
> Thx
>
>



sali

2004-11-22, 8:55 pm

just look at the font list.
you should replace "empty/rastered rectangle" with *your* selected
combination.
so, youare not sending code for rectangles, but in that place put your
values for the chosen font size.

"Drazen" <app@euronet.hr> wrote in message
news:cntim0$38c$1@ls219.htnet.hr...
> Hi!
> Well, my old application written in clipper must now print on IBM

Infoprint
> 12 laserjet printer. PCL Font list have array of escape seqeunces
> for every font, but i don't understand every character or sign in that
> escape sequnces.
> For example:
>
> <Esc>( "here is empty rectangle" <Esc>(s0p here is another rectangle with
> shape h0s0b4099T .
>
> Ok, problem is (confuse me a chr( ) code for that rectangles???): How I

can
> write this command in clipper?
> Normally is : ?chr(27)+"(" ??? +chr(27)+"(s0p"+ ??? + "h0s0b4099T"
>
> Symbol set on printer is set to PC-852.
>
> Thx
>
>



Klas Engwall

2004-11-23, 3:55 am

Drazen,

>Well, my old application written in clipper must now print on IBM Infoprint
>12 laserjet printer. PCL Font list have array of escape seqeunces
>for every font, but i don't understand every character or sign in that
>escape sequnces.


In addition to what the other guys said, here is a small piece of
sample code that will print a rectangle with height 130 PCL units and
width 560 PCL units and fill it with a 10% raster.

cRectangle := ;
chr(27)+"&f0S"+; // Push PCL cursor position
chr(27)+"*c+560a+2b100g0P"+; // Line right L=560 W=2 100% black
chr(27)+"*p+0x+130Y"+; // Move right 0 down 130
chr(27)+"*c+560a+2b100g0P"+; // Line right L=560 W=2 100% black
chr(27)+"&f1S"+; // Pop PCL cursor position
chr(27)+"&f0S"+; // Push PCL cursor position
chr(27)+"*c+2a+130b100g0P"+; // Line down L=130 W=2 100% black
chr(27)+"*p+558x+0Y"+; // Move right 558 down 0
chr(27)+"*c+2a+130b100g0P"+; // Line down L=130 W=2 100% black
chr(27)+"&f1S"+; // Pop PCL cursor position
chr(27)+"*c560a130b10g2P" // Rectangle 560x130 10% shaded
set printer to lpt1
set device to printer
@ prow(),pcol() say cRectangle
eject
set device to screen
set printer to

The rectangle itself if built of four lines with a width of 2 PCL
units. But there are no actual lines in PCL, so the lines themselves
are in reality narrow rectangles (560 long by 2 wide for example).

When moving from one position to another (or printing text) you must
push the cursor so you can easily find the original position again
later on. When drawing a rectangle the cursor returns to the starting
position automatically.

Hope this is clear enough,
Klas

-------
klas dot engwall at engwall dot com

Spammers, please use this address :-) mailto:postmaster@[127.0.0.1]
Klemens Lichter

2004-11-24, 8:55 pm

Hi,
please check

http://pcl.webs.com.ua/pcl/pcls/bpl.html

there you will find a list of common PLC commands and how they are used. In
some commands there is a # within the command and this # you have to replace
with a value maybee the fontsize in points or paper size or something else.
This values you donīt set in ASCII but in characters, so if you have to set
a point size of 10 your command is ESC(s#V where # = 10 = chr(49)+chr(48) so
your whole commandstring to send to the printer is
? chr(27)+"(s10V"

HTH
Klemens


"Drazen" <app@euronet.hr> schrieb im Newsbeitrag
news:cntim0$38c$1@ls219.htnet.hr...
> Hi!
> Well, my old application written in clipper must now print on IBM

Infoprint
> 12 laserjet printer. PCL Font list have array of escape seqeunces
> for every font, but i don't understand every character or sign in that
> escape sequnces.
> For example:
>
> <Esc>( "here is empty rectangle" <Esc>(s0p here is another rectangle with
> shape h0s0b4099T .
>
> Ok, problem is (confuse me a chr( ) code for that rectangles???): How I

can
> write this command in clipper?
> Normally is : ?chr(27)+"(" ??? +chr(27)+"(s0p"+ ??? + "h0s0b4099T"
>
> Symbol set on printer is set to PC-852.
>
> Thx
>
>



sali

2004-11-26, 3:55 pm

just look at the font list.
you should replace "empty/rastered rectangle" with *your* selected
combination.
so, youare not sending code for rectangles, but in that place put your
values for the chosen font size.

"Drazen" <app@euronet.hr> wrote in message
news:cntim0$38c$1@ls219.htnet.hr...
> Hi!
> Well, my old application written in clipper must now print on IBM

Infoprint
> 12 laserjet printer. PCL Font list have array of escape seqeunces
> for every font, but i don't understand every character or sign in that
> escape sequnces.
> For example:
>
> <Esc>( "here is empty rectangle" <Esc>(s0p here is another rectangle with
> shape h0s0b4099T .
>
> Ok, problem is (confuse me a chr( ) code for that rectangles???): How I

can
> write this command in clipper?
> Normally is : ?chr(27)+"(" ??? +chr(27)+"(s0p"+ ??? + "h0s0b4099T"
>
> Symbol set on printer is set to PC-852.
>
> Thx
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com