Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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



Report this thread to moderator Post Follow-up to this message
Old Post
Drazen
11-23-04 01:55 AM


Re: Urgent: Escape sequences for laser printer
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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Klemens Lichter
11-23-04 01:55 AM


Re: Urgent: Escape sequences for laser printer
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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
sali
11-23-04 01:55 AM


Re: Urgent: Escape sequences for laser printer
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]

Report this thread to moderator Post Follow-up to this message
Old Post
Klas Engwall
11-23-04 08:55 AM


Re: Urgent: Escape sequences for laser printer
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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Klemens Lichter
11-25-04 01:55 AM


Re: Urgent: Escape sequences for laser printer
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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
sali
11-26-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clipper archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:37 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.