Solved

sending PCL commands to printer

Posted on 1997-10-11
3
735 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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

831 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