Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PCL for FONT SIZE 1

Status
Not open for further replies.

RP001

Programmer
May 12, 2003
15
IN
Hi

Can someone please give me a example of a PCL command which changes the font size. I formatting a labels document thru PCL commands where same fields needed to be printed in bigger fonts. Thanks!
 
If it is a proportional font then ...

<esc>(s###V

where ### is the desired point size.


If it is a fixed pitch font then ...

<esc>(s###H

where ### is the pitch in CPI

Note that a higher pitch creates a smaller font, while
a larger point size creates a bigger font.

If your printer doesn't have scalable fonts, then the
only valid point sizes and pitch values will depend on
the available printer fonts. Print out a typeface listing.

There is no problem with a any LaserJet made in the last
10 or 12 years, but many(most) of the DeskJets do NOT contain scalable fonts.

Jim Asman
jlasman@telus.net
 
Thanks Jim,

It worked. However what is the terminating PCL command. i.e. All my fields following this command changes its font size. I just need to change the size for only 1 field. Will appreciate your comments!.

 
There is no terminating command as such, you just issue the
code for the prior font It's not like bold where it is either on or off. The values are open ended.

However, in the spirit of the question, you could set the secondary font to the larger size, and then jump to it for the one field and then back to the smaller primary.

It works like this.

<esc>)s###V sets the point size for the secondary
<esc>)s###H sets the pitch for the secondary

Note the right paren designates the secondary font.

By default the primary font is active. Once the secondary is defined

issue 0x0e or chr(14) to jump to the secondary
0x0F or chr(15) to jump back to the primary

To print a field in the secondary font...

chr(14)YOUR DATAchr(15)

That code would print YOUR DATA using the secondary font and
subsequent characters in the primary font.

Jim Asman
jlasman@telus.net
 
Thanks, it worked.

FYI. This is the first time my playing with PCL commands and also my first on any forum. Great stuff..it really helps!
 
The terminating character in most all pcl commands is a
Capital letter:

lowercase letters mean the sequence continues.

for example
print #1,chr$(27);&quot;&a2R&quot;;
would go to line 2 and whatever that current column/horizaontal position is.

print #1,chr$(27);&quot;&a2r100H&quot;;

would go to line 2 and 100 Horizontal units.

(approx 1.5 Columns at 10CPI disregarding the margins).

so,
print #1,chr$(27);&quot;&a2r
and
print #1,chr$(27);&quot;&a2R

(ending quotes intentionally left off)
do the same exact align the print to line 2 but the first
says that there are more commands to be processed while the
second says this is the end of the sequence.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top