ftp.nice.ch/pub/next/tools/printer/DeskJet.2.03.N.bs.tar.gz#/DeskJet_2.03

COPYING
 
DeskJet_2.03.README
 
Makefile
 
README.rtf
[View README.rtf] 
Readme.orig
 
Readme:Print_Panel
 
binfile.c
[View binfile.c] 
compress.c
[View compress.c] 
djf
 
djf.8
 
djf.c
[View djf.c] 
djf.printcap
 
djwraps.psw
 
legal_150dpi_tray.ps
[View legal_150dpi_tray.ps as PDF] 
letter_150dpi_envlop.ps
[View letter_150dpi_envlop.ps as PDF] 
letter_150dpi_tray.ps
[View letter_150dpi_tray.ps as PDF] 
letter_300dpi_tray.ps
[View letter_300dpi_tray.ps as PDF] 

README.rtf

PostScript on Your HP DeskJet



Over the past months I searched for an inexpensive, but useful, PostScript printer for the NeXT computer. I found several good leads which I report here. This package is my small effort to repay those toolsmiths who have graciously offered their work for our use. My contribution here is simply one of testing, documentation, and integration.

The distribution is done with a compressed tar file, djf2.1.tar.Z. Extract the files from this with the command "zcat djf2.1.tar.Z | tar xvf -". This creates several files under the directory djf. The individual tools referred to in this package are re-distributed by the gracious permission of the authors. Please report errors found in the filters directly to the authors. Errors or improvements in the documentation should be sent to me.

		Terry Gliedt
	                                                                                <tpg@rchland.vnet.ibm.com>

The Search

	If I had seen you (Hook) and Descartes, it is by standing on the shoulders of giants.
		Isaac Newton

There have been a number of independent efforts to provide PostScript  support for non-PostScript printers. In addition others have provided tools to aid in the process. The following is a list of the works I have discovered:

iwf (Eric P. Scott, <eps@cs.sfsu.edu>) written for the Apple Image Writer II. This is the original work from which most others have been derived.

djf (Derek Beatty, <beatty@cs.cmu.edu>) written for the HP DeskJet. It appears a good choice for people using USA-size paper. It provides a means to select both the resolution and paper feed.

djf (Reimer Mellin, <ram@ramsys.sta.sub.com>) written for the HP DeskJet. This appears to be a good choice for people using A4 paper.

ljf (Bert Lindgren, <gt8855a@prism.gatech.edu>) written for the HP LaserJet.  I never was able to try this out.

pclcomp (Tony Parkhurst, <tony@sdd.hp.com>) is a compression filter which most authors seem to be using to reduce the size of the data stream.

compress (Free Software Foundation) is another compression routine extracted from Ghostscript which is used to reduce bitmaps.

Dots (Frederico Heinz, <frederico@louis.actis.de>) is a commercial package providing support for a number of different printers.

Next OS 3.0 (NeXT Inc.) has reportedly added some form of support for non-PostScript printers, presumably using the same techniques as these filters. I have yet to see this, so I can only speculate what is the release. It may be that none of these filters will be necessary with 3.0.


The Choice - djf

I have chosen to integrate Derek's djf, simply because I have a DeskJet and use USA-sized paper. I have used Reimer Mellin's version and it seems to work well also). Printers using this djf filter may be used as a normal ASCII printer. However, when you print PostScript streams to a printer using this filter, the PostScript is transformed into bit streams for the DeskJet. The filter is capable of driving the printer at all 4 of its bitmap resolutions: 75, 100, 150, or 300 dpi. Data printed below 150 dpi is of very poor quality. Data printed at 150 dpi is generally of quite good quality and still reasonably fast. As you would expect, data printed at 300 dpi is slower, but the resolution is very nearly as good as other 300 dpi PostScript printers. At 300 dpi you may see the DeskJet-print head hesitate for several seconds. This, of course, depends greatly on the nature of the data you are printing.

Next OS 2.1

In my experience it is absolutely necessary to be using version 2.1 of the NeXT Operating System.  As one wit commented to me, "2.1 is needed for anything that requires the power to be on". As near as I can tell, this is the absolute truth. I understand the serial device driver in version 2.0 has some serious problems and this has certainly been my experience. It appears that almost anything can and will occur when using version 2.0 serial devices.

DeskJet 500

The software as distributed works for the DeskJet 500. I have been led to believe the support for the DeskJet will work with all varieties of DeskJet black and white printers. No, your color Deskjet 500C will not print in color, although I have seen a claim the commercial package, Dots, supports the 500C (I have no experience with Dots). I have seen suggestions in comp.sys.next that NeXT version 3.0 will have support which might allow your color printer to work.

In my experience I only managed to print about 250 pages on my DeskJet before the ink cartridge ran dry. This is substantially less than the 500-1000 pages I was led to expect. Then again, on my NeXT computer, I use many graphic images and these require quite a bit of ink compared to typical text. Your mileage may vary. There has been quite a bit of discussion on the net about techniques to re-use the DeskJet cartridges. Apparently, you can refill the cartridges and use them several times over.

Your DeskJet DIP switches should be set to disable perforation skip (switch bank 1, DIP 8 set UP) and to communicate with the computer at 19200 baud (switch bank 2, DIP 4 DOWN, 5 UP) with no parity (switch bank 2, DIP 6 & 7 set DOWN). See your DeskJet documentation for details on these or other settings. If you are using an older 68030 processor, you will probably need to change this to communicate at 9600 baud (DIPs 4&5 in switch bank 2 DOWN). The faster 68040 processors can support the faster speed. It has been my experience the printer should use DTR and XON/OFF (switch bank 2, DIP 8 UP).

Make Sure Your Printer Works

The first task is to ensure that your printer and computer are communicating. HP printers use a null-modem cable. I understand this can be purchased from NextConnection for about $15. You may also use a standard Next cable (perhaps from NextConnection) and then use a null modem adapter from your nearby electronics store (Radio Shaack has one for $5). If you want to make your own cable, refer to the man page for zs. 

Verify that you printer cable works by setting the switches for your printer to 9600 baud and simply try sending a small ASCII file directly to the printer. Don't continue until this works. Once this works you are ready to create your printers and see if the system works as you expect.

Putting It All Together

You should be able to use the Makefile to control most things you may want to change. Beware that once a printer is defined using the Makefile, you can and must use PrintManager to delete the printer before re-defining it again. The package assumes your filter will reside in /usr/local/lib.  The definition also assumes your printer is attached to the first serial port (/dev/ttya) and the printer is set to communicate at 19200 baud. The name of your print queue is assumed to be dj. You may change any of these values by making the proper changes in the Makefile. A number of Makefile rules are provided:

make all  - will create the filter, djf.

make install - will define the printer and install the filter.

make verify-shlib  - verifies the offsets in /usr/shlib/libNeXT_s.C.shlib for some key values that need to be changed if you want to enable the resolution and paper feed buttons on your print panel. See Readme:Print_Panel for a Derek's original description of what needs to be done. I wrote a simple program, binfile, to assist in the 'editting' of  the troublesome /usr/shlib/libNeXT_s.C.shlib file.

make change-shlib  - modifies /usr/shlib/libNeXT_s.C.shlib to enable the resolution and paper feed buttons on your print panel.

make install-shlib  - installs the newly modified /usr/shlib/libNeXT_s.C.shlib. It appears that, for me at least, this causes NextStep to loop. You  may need to break out  to the NMI monitor (left-command+right-command+~) to reboot your machine. While this is disruptive, it has not appeared to harm anything for me. Be careful!

make test-150  - prints a PostScript at 150 dpi.

make test-300  - prints a PostScript at 300 dpi.

Bugs

At the moment, I am not aware of any problems with the code. Please report problems to the authors. Documentation errors in this guide should be reported to me.

Distribution

This code may be redistributed according to the restrictions placed upon it by the authors mentioned above.  Check the copyright notices in the various *.c files. In addition the file COPYING includes a notice from the Free Software Foundation ghostscript package.


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.