Solved

sending PCL commands to printer

Posted on 1997-10-11
3
704 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
Comment Utility
Adjusted points to 200
0
 
LVL 4

Accepted Solution

by:
jlms earned 200 total points
Comment Utility
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
Comment Utility
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Suggested Solutions

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…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now