How to send printer control codes from Unix

I have been tinkering for hours but to no avail.  
What is the Unix command to send control codes to the printer which will then produce 17pt font or condensed mode?  
I tried:
# echo ESC ( s 17 H
I also tried it in decimal and hex.

Thanks in advance,
Mike
MikeSieversAsked:
Who is Participating?
 
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
The command
  echo "\033(s17H\c"
will do. \033 stands for ESC (octal value 33 in the ASCII character set -- see man ascii)

Make sure your printer (filter) does allow raw data (does not filter it out, changes to plain text)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.