Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageHi, 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 > >
Post Follow-up to this messagejust 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
>
>
Post Follow-up to this messageDrazen, >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]
Post Follow-up to this messageHi, 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 > >
Post Follow-up to this messagejust 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
>
>
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.