In last years a lot of manufacturers have manufactured hardware 'Designed for Windows'. Many people think that this means that this hardware can only work in Windows. I think this is not really truth, as many other people do. It really means that the device uses a non- standard mode to deal with the OS, so the standard methods for driving the hardware will not work.
If you know about the 'non standard mode', you can develop a driver for the device.
Better, if the manufacturer provided a driver for every OS (Linux in our case), and not only Windows, there will be no problem. A little advertising: email HP (or any other manufacturer) and tell them to provide Linux drivers for all their hardware.
This is exactly what is happening with our printers. HP has designed a protocol, PPA, with is not the standard one, but reduces the cost of the printer by having the CPU (the driver) doing all the work, reducing the protocol to the orders that a microprocessor would give to the motor itself, and removing the microprocessor from the printer.
Tim Norman, a hacker in heart ;-) studied the protocol used by those printers and wrote a filter that converts pbm files (generated by GhostScript) to the PPA protocol, and started a mailing list to help him develop it.
Some time later, the list growed, and some other developers started writing code (look at the CREDITS file), providing a full-color filter, pnm2ppa, now in a stable release.
This document is developed under the GNU General Public License. You can use, copy and distribute copies of this document as you want. You can modify it too, but any derivated work must be under GLP license too, and mention this document.
I (Javier Sedano) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS DOCUMENT, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A CERTAIN PURPOSE; IN NO EVENT SHALL I BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OF THIS DOCUMENT. Short: read and use at your own risk.
(copied from CD-Writing-HOWTO, by Winfried Trumper; you don't mind, Winfried, do you?)
I own a HP-720C and those would be the proceeding a will explain in this document. But I suppose it will work in any of the mentioned printers: any of the 710, 712, 720, 722, 820 and 1000 series as far as any other PPA printer.
You will probably get the latest version of this document at the project home page at Sourceforge and maybe too in uc3m-GUL.
If you knew something about older versions of this HOWTO, this subsection
is for you. Since the stable 1.0 release of pnm2ppa
many things has
changed.
pbm2ppa
isn't now the latest stable filter, so we won't use it
here (for information about it, refer to documentation files inside pbm2ppa
files itself, or try to get an older version of this HOWTO).
Most mayor distributions include native support for PPA printers (using
pnm2ppa
, of course), so the printer can work simply running its printer
configuration tools. NOTE: you may need to use this HOWTO or the files provided
with pnm2ppa
for calibration and/or gamma correction.
In the project home page at Sourceforge, there are available packages for many distributions (Redhat, Mandrake, Debian,...), so this document is only used if you want/need to install the printer support from scratch.
Three mailing list have been created in order to help developing the filters:
ppa.announce@listbot.com
Whenever a new version of the software is developed, or someone has something to say to everybody, this list is used.
ppa.users@listbot.com
The users of a PPA printer should be subscribed here, so what are you waiting for? New releases of the software, information,... not too much messages, so won't annoy you.
ppa.devel@listbot.com
The developers of the software are subscribed here. In fact almost all the messages about the filter or the printers are posted here. This is not the best solution (what about the other two list?), but is what is happening.
If you can, subscribe to these lists. Even to ppa.devel. If you can't develop new software you can always test it, report bugs, help new users,... I mean HELP. I have not written any code, but I try to help by writing this HOWTO. You can do something similar by translating README files, writing new ones for your distribution, translating this HOWTO itself.
Of course, the documentation that is provided with the software itself. This is the main source, even for this HOWTO. There is available documentation for installing under Redhat, Caldera and Suse, and files concerning intallation, calibration and gamma-correction.
The main source of information for developers is the project home page at Sourceforge.
pnm2ppa
is provided with a man page (in doc/en/pnm2ppa.1
,
installed into /usr/local/man/man1/
).
Where can I retrieve that filters?
Of course, in the project home page at Sourceforge. If you own one of the distributions there are packages for (Redhat, Mandrake, Debian,...) download and install them, using the distributions packages management utilities, and the jump to the CALIBRATION section bellow (you don't need to compile and install the filters nor the printer). If you want to install from scratch and compile yourself, download the tgz tarball, and follow instructions.
First of all, test your printer. If you have Windows 9x, boot into Windows (don't worry, it would be just about half an hour, at most XDDD), install the HP-provided driver and print a few test pages; print that undressed girl you got in the hidden directory too ;-)
It works? All right.
PPA is actually a two-way protocol. But in facto, the hard work is PC to printer communications. The other way carries information about 'no paper', 'ended', 'errors',... so they can be (almost) safely ignored.
The filter translates the format generated by GhostScript to the code used in that communication, and the printer doesn't know whether we are hearing its info or not.
You can get a detailed explanation of PPA protocol from the project web page.
Following this HOWTO, you will find problems, sure. Here are some hits to solve them:
sgml2html
,
and a space is added at the end of some (every?) lines. In the scripts, the
scape bar (\) will scape that space, instead the CR, causing missfunction
of the script./var/log/syslog, /var/log/messages, /var/log/lpr.log
(dependent on the distribution)./etc/hosts.lpd
file. Do you have permissions to use the
printer in your system itself?ppa.users@listbot.com
and ask us there. Don't email
me directly, please. Don't missunderstand me, I don't mind to help you; even
more, I will probably be one of your helpers if you post to the mailing list.
But the developers of the filter and some UNIX gurus are subscribed there,
and they know much more than me, sure. When mailing, please, don't just say
"It doesn't print" (add falsetto voice here ;-)... Tell the printer model, the
things that you have tried but have failed, the error messages (both in console
and in syslog),... everything that can help.In Linux 2.0.x kernel and older, the first parallel port (name LPT1
in MSDOS/Windows) is /dev/lp1
. In Linux 2.2.x kernel, the that port
is /dev/lp0
.
In the document I will use /dev/lp0
(because my kernel is 2.2.12),
but if you got a older kernel or the printer attached to a different port,
you should change every occurrence of /dev/lp0
by you port.
The commonest case is you got the printer attached to LPT1, so, in sort:
use /dev/lp1
if you are using 2.0.x kernel and /dev/lp0
if
you are using 2.2.x kernel. You can check your kernel version with
uname -r
Of course, you need to do all this as root. Only the final test, lpr filename.ps
,
can be done as non-root user.
In many places you are told to make a script. Do you know how to do it?
If you don't, I will explain it: If you are familiar with MSDOS, scripts are very similar to .BAT files.
Use you favorite editor (vi
, joe
, emacs
, kedit
,
...) to type the text that you are told in this document. Notice that almost
every script start with
#!/bin/sh
or
#!/bin/bash
Now change the permission for the script to be executable:
chmod +x file
Now execute it, as if it were a binary file.
Lets make an example:
Use your editor to type
#!/bin/bash # This is a comment. What I put after # is not executed. # ;-) XDDD Hellooooo!!!! AGGGFFFF!! # The next line is executed: echo Hello World
(Remember to press Enter
after the last line; it's important!)
Save it as myscript
and type in the command line:
chmod +x myscript
Now, execute it:
./myscript
In the screen a line containing 'Hello World
' may have
appeared. If doesn't, check what you have done.