Solved

sending PCL commands to printer

Posted on 1997-10-11
3
726 Views
Last Modified: 2008-03-03
I have a DeskJet 660Cse (with RedHat 4.2 and GhostScript
5.1) and I have been trying to control the print quality -
or how dark it prints. When I use the printer in DOS or
Windows, I can choose between best, normal, or econofast
(each one using less ink respectively - and increases
speed). Under Linux, everything seems to print great except
I cannot change the print quality, it always seems to print
in "best" mode - I would like to print in "econofast". Even
in the printtool from RedHat, the color depth is set to it's
lowest setting 3 (1 does not work for some reason), it still
prints in "best".  In the spirit of Linux I have searched
everywhere to find an answer and think that I have found
one, but I have no idea how exactly to do it. On HP's
website I found a page (here it is so you can see what I have):

http://hpcc923.external.hp.com/cposupport/printers/support_doc/bpd02925.html

that lists all the PCL commands for the DeskJet 600 series -
in hex, decimal, and ASCII. These control everything - print
quality, font size, paper size, print cartridge services
(alignment and cleaning) and self tests. It would seem to
me, all that I would need to do is pass the correct PCL
command to the printer and I should be able to set the print
quality. So............. how do you send PCL commands to the
printer? There is nothing on the HP site and I only saw PCL
vaguely referred to once in one of the Print-HOWTOs and it
said nothing about what they are (now that I have seem them
I know) or how to use them. I also looked through all of the
ghostscript docs and nothing was mentioned there either.  

0
Comment
Question by:buck88
  • 2
3 Comments
 

Author Comment

by:buck88
ID: 1633753
Adjusted points to 200
0
 
LVL 4

Accepted Solution

by:
jlms earned 200 total points
ID: 1633754
You have to create a file with the commands you need, to include the escape character try using the ^ symbol, if that does not work then write a small program (any language, even awk) that writes the Escape character and get this character in a file, this way you can always insert the caracter were needed.

Now, when you have the commands just send the file before your data proper; a filter for your printer queue could send this PCL commands automaticaly before your data.
0
 

Author Comment

by:buck88
ID: 1633755
The answer seems very good, unfortunetly I would not condider my self "experienced" in any type of programming (regarding the escape character). And as far as the file with the commands, how  exactly do I make this file? Do I sent the PCL commands with ASCII, hex, or dec? Could you give me an example of this file for, say, something simple like the selftest. Or actually, the main goal that I have was to sent the command for "econofast" print quality. You mention it in you answer that I could send this PCL command automaticaly before my data. That was the way I thought that I could do it but I do not know how. I am sorry for not having menitoned my lack of experience before hand, but I am very, very eager to learn anything I can!. If you could explain the answer above a more indepth it would be greatly appreciated.

Thankyou very much for you time.

buck@netnet.net
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
nagios alerts 3 44
VMware Workstation 12 Player 16 73
ftp to port 21 4 43
Bash script - Exit out of choice loop 2 28
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

770 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