Solved

sending PCL commands to printer

Posted on 1997-10-11
3
763 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

717 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