|
|
Urgent: Escape sequences for laser printer
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
|
|
0
|
|
|
|
Reply
|
app4335 (4)
|
11/22/2004 8:37:31 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
>
>
|
|
0
|
|
|
|
Reply
|
csl (20)
|
11/22/2004 10:35:53 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
>
>
|
|
0
|
|
|
|
Reply
|
sali5587 (72)
|
11/23/2004 12:05:54 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]
|
|
0
|
|
|
|
Reply
|
klas.engwall (791)
|
11/23/2004 3:01:35 AM
|
|
|
3 Replies
185 Views
(page loaded in 0.089 seconds)
|
|
|
|
|
|
|
|
|