Operating System - HP-UX
1819966 Members
3461 Online
109607 Solutions
New Discussion юеВ

escape character for ascii text printing

 
Ramakrishna_3
New Member

escape character for ascii text printing

We are using escape character as 27 and use fprintf( pf,"%c(10U%c(s0p16.67h8.5v0s0b0T", 27,27 ); to modify the font size to print 132 characters per line. It is printing in 2 lines. When i open the file in vi editor, the lines are of 132 character in single line. Please suggest what is wrong? How do i get to know if this font is supported on our printer?
using lp -d "printer name" to print the file on AIX 5L unix system
2 REPLIES 2
BONNAFOUS Jean Marc
Trusted Contributor

Re: escape character for ascii text printing

hi,

Try
fprintf(pf,%c,"^[(10U^[(s0p16.67h8.5v0s0b0T")

^[ is escape character (single character). You can generate it on command line or vi by using CTRL V (CTRL key in same time V key)subsequently ESC key.

Rgds
JMB
Si vous ne faites jamais de b├йtises, c'est que vous ne faites rien de difficile. Et ├зa c'est une grosse b├йtise.
Mike Miller_8
Regular Advisor

Re: escape character for ascii text printing

Try :

fprintf( pdf,"^[(10U^[(s0p16.67h8.5v0s0b0T");

To put in the escape character just hit control-v and then hit the escape character.

= Mike =