C printer commands

K

KJ

Would anyone have a list of printer commands to use within printf for
a deskjet printer in C. I have worked out that bold is
\x1B\x28\x73\x33\x42 but i would like to have a list to perform other
commands like font size, etc...

Any help would be appreciated.
 
J

Joona I Palaste

KJ said:
Would anyone have a list of printer commands to use within printf for
a deskjet printer in C. I have worked out that bold is
\x1B\x28\x73\x33\x42 but i would like to have a list to perform other
commands like font size, etc...
Any help would be appreciated.

What gave you the impression this had anything to do with C? The printer
is the one in charge of those commands. They work the same way no matter
what language printed them. Please ask in a newsgroup dedicated to your
own implementation instead.

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"There's no business like slow business."
- Tailgunner
 
M

Mark A. Odell

(e-mail address removed) (KJ) wrote in

Would anyone have a list of printer commands to use within printf for
a deskjet printer in C. I have worked out that bold is
\x1B\x28\x73\x33\x42 but i would like to have a list to perform other
commands like font size, etc...

The C language does not define such things. You happen to have found some
character sequences that do "interesting" things for your printer but this
has nothing to do with the C language. There must be a list of sequences
in your printer's programming manual (my HP Laser Jet came with such a
manual, if yours does not, try the company's website).
 
T

Thomas Matthews

KJ said:
Would anyone have a list of printer commands to use within printf for
a deskjet printer in C. I have worked out that bold is
\x1B\x28\x73\x33\x42 but i would like to have a list to perform other
commands like font size, etc...

Any help would be appreciated.

HP Printers use a language called PCL. It is based on escape sequences:
an ESCAPE character followed by other bytes or characters. Search
their website for more information. They do have a book about 2 inches
thick describing the language.

Some HP printers also use a language called Postscript. This is
Page Description Language developed by Adobe, Inc. They too have a
thick book available that describes the language. Check out their
websidte at http://www.adobe.com.

However, many platforms use a "driver" between the printer and your
application. The driver converts operating system commands (function
calls) into the printer's language. This is a lot more productive
than sending the actual printer commands. In the Postscript class
that I attended, they said that very, very few people write in
Postscript; everybody else uses the drivers.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top