Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to send printer control codes from Unix

Posted on 2005-04-29
1
Medium Priority
?
310 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:MikeSievers
1 Comment
 
LVL 17

Accepted Solution

by:
Hanno P.S. earned 500 total points
ID: 13895713
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question