Linux Lexmark 1100 Printer Driver 1.0 ================================== Tim Engler <tim@burntcouch.com> March 5, 2000 Description ================================== This printer driver actually just converts a ppm file(Portable PixMap) to the binary code used to feed the printer. The driver is meant to run behind ghostscript or some other convertor to generate the ppm from whatever format the data from the application. Since Lexmark will not release protocol specification I had to dissassemble the byte codes sent by their windows driver to create this. This program does not come with any warranty, use at your own risk! Changes since 0.91: 300x300 b&w printing. Printing using the black and white cartridge can be done with the -bw option brightness control. amount of ink used can be set by specifying -b [0-255] better centering. If image extends beyond margins, it will be centered on the page. no more cmy.txt. These values are hardcoded into the program, thanks to Zhuo Meng Current features: 300x300 color printing Low memory consumption(uses around 1 megabyte when printing a 8 1/2 x 11 page) Error diffusion Nearly correct color. I was able to do this by creating a color map based on output from the Windows printer driver. A nifty printer simulator. I created this in perl a long time ago which only handles small images. This simulator takes in a lexmark data file and converts it back into several ppm's, one for each swipe of the printer head. Bugs: Ghostscript images aren't quite centered. This is because ghostscript creates an image the size of the page, and the printer cannot print all the way to the left edge. Too slow. On my Pentium II 300 runs about twice as slow as the printer can feed the paper. To Do: Improve speed. Huge white spaces cause a problem where the driver is simply searching for data to print, while the printer remains idle. Improve resolution. I will have to get around decoding the 600x600 images. Improve color. Color is a little granular for some reason. Convert to a ghost script driver. I might be able to skip white space faster this way, at least around the edges. Installation ================================== 1. Compilation $ make 2. Integration To install this driver on RedHat 5.2, you can do what I did which is as follows: Copy these files into /usr/lib/rhs/rhs-printfilters/ # cp lm1100 ps-to-printer.fpi \ /usr/lib/rhs/rhs-printfilters Configure at least one printing entry in /etc/printcap. You may use Red- Hat printing tool. Just select any *NON* PostScript printer you wish (PCL DeskJet or LaserJet). Printer selection and resolution is overriden to Lexmark in my ps-to-printer.fpi script. Do *NOT* check `Fast text printing', otherwise text printing will not work. Set correct paper size. Add either `-sPAPERSIZE=a4' or `-sPAPERSIZE=let- ter' to gs command in psprint and ps-to-print.fpi scipts. Print a file by typing # lpr whatever.ps or in Netscape, just go to the print menu and print. Use "lpr" for the command. (I'd like to make this less of a hack, but RedHat's printtool is tied to ghostscript which makes it difficult to add your own driver cleanly.) For other distrubutions, you need to set it up manually: The executable, "lm1100" can either read from a ppm file or stdin. To read from stdin, use: lm1100 - or to read from a ppm file: lm1100 <file.ppm> To print with the b&w cartridge, add the "-bw" option. If the printing is too light use -b [0-255]. The lower this value, the more ink will be used, 255 is the default. When reading from stdin, lm1100 expects one or more images to be sent, so if your input program sends a ppm image per printer page(like ghostscript does) than lm1100 will handle it. A way to print a postscript file would be to run: gs -q -sDEVICE=ppmraw \ -r300 \ -sPAPERSIZE=(Letter|A4|Legal) \ -dNOPAUSE \ -dSAFER \ -sOutputFile=- \ - | lm1100 - > /dev/lp(0|1|2) where sPAPERSIZE is the size of your paper, and /dev/lp(0|1|2) points to your printer input. For an example, look at ps-to-printer.fpi Contact me at <tim@burntcouch.com> for further questions Printer Simulator ================================== This is mainly useful for developers who would like to improve my driver or write their own(I'm offering this instead of a protocol specification sheet). It takes an lm1100 printer output file(from windows or lm1100) and creates a bitmap for each printer swipe. The area covered by the printer head will be highlighted with dark green,blue and red(128,128,128) for each of the individual jets. Actual ink will be displayed with bright red,green, and blue which correspond to the printers three ink jets. It can also handle b&w images. There is redundant data before each of the swipes which must match for the printer to print correctly. The lexmark2ppm does several checks to make sure each of the data points are specified correctly. To run the printer simulator, type: lexmark2ppm.pl <lm1100 file> [output file base] lm1100 file - driver output file to read output file base - naming for output files, #.ppm will be appended to the base,(ex. foo = foo1.ppm,foo2.ppm etc.) if this isn't specified, lexmark2ppm will simply print information on the printer output and exit Thanks ================================== I'd like to thank Henryk Paluch whose Lexmark 7000 printer driver I examined to get ideas on how to write this one. I'd like to also thank Zhuo Meng for his work to help improve the driver.