473,412 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

C printer commands

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.
Nov 13 '05 #1
3 4969
KJ <ke********@orange.net> scribbled the following:
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 (pa*****@cc.helsinki.fi) ---------------------------\
| 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
Nov 13 '05 #2
ke********@orange.net (KJ) wrote in
news:7a**************************@posting.google.c om:
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).

--
- Mark ->
--
Nov 13 '05 #3
KJ wrote:
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

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Vlki | last post by:
Hello, I can't find a way to send printer specific language codes to printer. Part of my code : String sString = "B50,0,0,3,1,2,50,B," + "12345678901234567890"; Font fFont = new Font("Arial",...
4
by: Charlie | last post by:
I need to print using the VB.net printing classes to a tractor feed printer. My client loaned me a Panasonic kx-p2123 to set up the job. I was able to print from Notepad using the Generic/Text...
3
by: Claude Hebert | last post by:
Hello, I have a need to print several reports (doing them as sub reports is not an option) In VFP we use the SET PRINTER commands to basically open the printer, print several reports, and...
0
by: a_man | last post by:
Hi everyone Im writing an application in c# and I want to print directly to a printer with some printer specific commands than only the printer understands. Below is my code. I have an arraylist...
0
by: mvreddy | last post by:
SIR, I NEED TO SEND PRINTER COMMANDS using pic microcontrollers to PRINTER USING C LANGUAGE,IS IT POSSIBLE TO SEND PRINTER COMMANDS TO PRINTER USING CONTROLLERS IN C, PLZ HELP..
10
by: krishnakant Mane | last post by:
hello all. I am developing an ncurses based python application that will require to create pdf reports for printing. I am not using py--qt or wx python. it is a consol based ui application and I...
10
by: suvarna | last post by:
hi i am having problem in firing commands to the hp printer through vb code. i used hp printer commands in my code but when the commands are fired it gives error "failed to print the doccument"....
2
by: hari | last post by:
Hi all, I need to automate printer command testing, prinetr supports parallel/ serial/USB.How can i send the commands from python to printer. I have got pyparallel, as am new to python, no...
1
by: deric | last post by:
Hi! I'm new to VB.net programming on printing a page to a thermal printer (Epson T88IV). I really had a hard time figuring out how to code the printing of a bitmap image and some text, while sending...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.