Some Technical Stuff

An Interesting Experiment

Did you know that your Macintosh can already print to your unsupported network printer, without needing anything else installed?

Note: this following experiment will only work for you as-is if you have a PCL printer connected to your network, and if that printer (or the print server) is AppleTalk compatible. This section is intended to amaze you and serve as an introduction to how we’re going to print. This procedure is also adapted for SMB and LPD use in the Troubleshooting section, but cannot be done now because we haven’t installed the proper software.

Note: These instructions assume you’re on a “zoneless” AppleTalk network, which you probably are if your network is small. If your AppleTalk network has zones, consult the man pages for atprint and atlookup to find your correct syntax, or see below.

Once you know AppleTalk is enabled and turned on in your system, try the experiment:

  1. Download the balthisarfiles package, and unpack it in a location that’s comfortable to you (alternatively, go to the Downloads area to see if there is a sample file for your specific printer model).
  2. Start a terminal session, and cd to the LangSamples directory in the directory that you’ve unpacked (i.e., such that you’re in the directory with the SampleLJ.PCL file and the SampleDJ.PCL file, or the printer-specific .PCL file that you’ve downloaded).
  3. Type: atlookup
  4. You should see something akin to this:
    				ff25.29.40 deskjet970:SNMP Agent
    				ff25.29.40 deskjet970:DeskWriter
  5. You’ll also see other AppleTalk devices on your network, if you have them. The point is, your AppleTalk printer can be seen by Mac OS X.
  6. Type: atprint deskjet970:DeskWriter < SampleDJ.PCL

Of course, provide your own printer name and type provided by the atlookup command. If you have a LaserJet, you may want to try the SampleLJ.PCL file instead of the SampleDJ.PCL. If you have a PostScript Level 2 printer, you probably don’t even need this help, but you can try the SampleLW.PS file (which is a PostScript Level 1 file). Finally, if you have a non-PCL printer, then go to a Windows machine, use the “Print to File” option of the Windows Print dialogue box, and generate a file using the command language for your own printer, or check here to see if I have a specific PCL file tailored for your printer model.

Note: if your printer showed up with a space in its name after the atlookup command, you’ll need to put the printer name in quotes (either single or double), for example:
atprint 'deskjet 970':DeskWriter
…or you can escape the spaces using a back-slash character, for example:
atprint deskjet\ 970:DeskWriter
In the second example, the backslash indicates that the next space character should not be treated as white-space (space between commands and parameters in UNIX), but as part of a contiguous string of text.
Note: if your printer is on on AppleTalk zone, the format you need to use is name:type@zone, e.g.,
atprint deskjet970:DeskWriter@HomeZone.

Your printer should have started printing the PCL code (as a legible document, that is) generated for you under the Windows operating system.

What did this just prove?

  • That the driver only needs to generate the printer control language. The SampleDJ.PCL file was generated on a Windows machine, but yet, it contained the same PCL any other operating system would have to generate, including the PCL that the already-installed HP drivers under Mac OS X 10.1 generate.
  • That the operating system already can deliver this code to a network printer. But for some reason, Apple chose not to trust its users to select their own hardware, and instead force the printer manufacturers to “officially detect” (and support) their printers on the network.

Problems? Did this little experiment not work for you? If you have an AppleTalk compatible device, then something probably happened, even if it wasn’t the result that you expected. The printer made a noise, or the page you printed was stretched or shrunken. Don’t worry, I generated these files using the Windows 98 DeskJet 500 driver, the LaserJet 4V driver, and the Apple LaserWriter PostScript driver, and maybe they’re not 100% compatible with the exact printer you have. That’s no big deal, though. If you want to confirm that this trick really works before proceeding, and you have access to a Windows computer, you can generate these files yourself using the proper driver for your printer, and the Windows “print-to-file” option in the print dialogue.