[NeXT_FAQ] 08_Printing
이름: capri91 2001-03-26 10:01:22

8 Printing

8.1 What printers (laser or otherwise) may be used with NEXTSTEP?

printer, NeXT

Adding supported postscript printers is rather simple:
  • Get a serial cable (e.g., Macintosh to LaserWriter Plus), but check whether that works with your printer

  • Configure using Print Manager

  • Configure printer communication according to manufacturer's recommendations. (9600 baud software flow control).
A sample printcap entry needs to be loaded into the netinfo database. You can use either niload printcap . < myprintcap, or use NetInfoManager to change the br and lp properties of your LaserJet. Using the default baud rate and /dev/ttya will also work, for most print jobs (if the printer is connected to this port).

LaserJet_III: \
:note=LaserJet_III:ty=HP LaserJet III PostScript: \
:sd=/usr/spool/NeXT/LaserJet_III:lp=/dev/ttyfa: \
:lf=/usr/adm/lpd-errs:af=/usr/adm/lp.acct:br=19200:rw:fc\#0000374: \
:fs\#0000003:xc\#0:xs\#0040040:mx\#0:sf:sb:if=/usr/lib/transcript/psif: \
:of=/usr/lib/transcript/psof:gf=/usr/lib/transcript/psgf: \
:nf=/usr/lib/transcript/psnf:tf=/usr/lib/transcript/pstf: \
:rf=/usr/lib/transcript/psrf:vf=/usr/lib/transcript/psvf: \

HP printer configuration:

auto cont = off    (doesn't matter)
I/O = serial
serial = rs-232    (for LJ III only)
baud rate = 19200  (or whatever baud rate you have in ni database/printcap)
robust xon = on    (doesn't matter)
dtr polarity = hi
startpage = off    (doesn't matter)
language = english
ret = med          (you choose for LJ III only)

Note that if you modify the printcap this way you cannot reconfigure this particular printer entry with PrintManager.

If you are using NEXTSTEP 2.0 and you use remote non-next printers, there is a bug that can be simply corrected by doing "dwrite system PrinterResolution 1" for each user trying to access non-next printers on the network. This not a problem in later NEXTSTEP versions.

8.2 What fonts can I use with NEXTSTEP?


Properly packaged Type 1 or 3 PostScript fonts will work with NEXTSTEP, but certain conversions may be necessary to get them to work. Freeware and shareware fonts are available on various ftp archives. There are utilities with NEXTSTEP to download fonts into postscript printers.

Freeware and shareware Type 1 and 3 fonts in files Fonts-1.0-free.tar.Z and Fonts-2.0-sw.tar.Z. Each file unpacks into it's own directory. Within each directory is a ReadMe.rtf and a Makefile. See the ReadMe.rtf for more font descriptions and installation instructions. (You may also find comments in the Makefile of interest.) These packages were prepared by Doug Brenner dbrenner@umaxc.weeg.uiowa.edu.

The same directory contains fonts Shalom (Hebrew and Yiddish in Old Style, Stick and Script typefaces, by Jonathan Brecher, shareware) and CyrillicGothic (san serif, by Jay Sekora). These were packaged by Jacob Gore jacob@gore.com to work with the Installer application.

WSI-Fonts for NEXTSTEP \#1
Abstract Software
POB 25045
Seattle, WA 98125-1945
Voice: 206 361 5080

Some fonts in Type 1 format for NEXTSTEP are also available from Y&Y:

Y\&Y, 106 Indian Hill, Carlisle MA 01741 USA
Voice: 800 742 4059
Voice: 508 371 3286
Fax: 508 371 2004
71172,524 on CompuServe
71172.524@compuserve.com from InterNet

There is a font converter available in the MetroTools package by MetroSoft (info@metrosoft.com).

8.3 How can I save my printable documents to a postscript file?

PS to file

Select PRINT from the main menu, then select SAVE from the resulting print panel.

8.4 How can I print only the even or odd pages of a document?

odd and even pages
even and odd pages
duplex printing
double sided print

I wish print on both sides by feeding the paper through twice.

We must recommend against re-using laser printed paper in your printers. The reason is that the toner which is used is not very robust, in that when heated again (which happens when you print) it can come off the other side of the paper. This causes a mess to accumulate in your printer, and probably some pretty rude things to happen.

psutils from comp.sources.misc is a much better solution, and includes a lot more capabilities, plus it is being updated constantly.

8.5 How do I get banner pages on my printer output?


There is a sample banner prologue file in /usr/lib/NextPrinter that is sent to the printer before or after the print job depending on what printer attributes are set in NetInfo. Sounds gross, but it isn't. Start up NetInfo on your printer machine. Go to the printer directory, and open up your local printer by double clicking it. Select the append property from Directory menu. Replace the name with BannerAfter (or BannerBefore if you want the banner page printed first). The select the New Value option, and put in the name of the banner prologue file.

If you do not wish to do fancy customization of the file, simply put the path to the NeXT sample banner file:


Save out the netinfo modifications.

8.6 How do I get [la]TeX files to print correctly on non-NeXT printers?


If you are printing to a non-NeXT printer from NeXT TeX using dvips, make sure you specify the correct resolution (300 dpi, usually), either on the command line with -D300, or in the /usr/lib/tex/config.ps file with a line that looks like : D 300

If you are printing from within TeXView, you will have to choose CustomResolution and enter the correct number (300, usually) because of the way DefaultResolution defaults to 0.

8.7 What if I have a PostScript font has not been ported to NEXTSTEP?

PS-Font to NeXT

Many PostScript fonts port to NEXTSTEP with little effort.

The easiest case is a font generated by Fontographer version 3.2 or above (a comment near the top of the file should say which program generated the font). This version of Fontographer can generate fonts "for NEXTSTEP". This means that no hacking of the font is needed, but you may need to make some adjustments to make it appear in your font panel.

Suppose you were porting the font family Shalom, which consists of three faces: Old Style, Stick and Script. Here is the procedure to follow:
  • In a working folder of yours, create folders called:


    Note that the font family name is to the left of the hyphen ("-"), and the typeface name is to the right and with no spaces in it.

  • Copy the outline font file for each typeface from wherever it is into its folder, and give it the name of the folder minus the ".font". For example, if you are doing this in a Terminal window:

    cp /Floppy/ShalomOldStyle.NeXT Shalom-OldStyle.font/Shalom-OldStyle
    cp /Floppy/ShalomScript.NeXT Shalom-Script.font/Shalom-Script
    cp /Floppy/ShalomStick.NeXT Shalom-Stick.font/Shalom-Stick

    If you are working in Workspace Manager's File Viewer, double-click on the big fat F icon to open the font directory as a folder, then you'll be able to rename files in it.

  • Do the same thing with the font metric files, but make the suffix ".afm":

    cp /Floppy/ShalomOldStyle.AFM Shalom-OldStyle.font/Shalom-OldStyle.afm
    cp /Floppy/ShalomScript.AFM Shalom-Script.font/Shalom-Script.afm
    cp /Floppy/ShalomStick.AFM Shalom-Stick.font/Shalom-Stick.afm

  • If there is a "read me" file with the font, or any other documentation, copy it into the .font folder too. For example, each of the Shalom font folders contains files ReadMe, CheatSheet.wn and Sample.wn specific to the typeface.

  • Edit the outline and font metric files to make them fit the NeXT AppKit's Font Panel, which is what most NextStep applications use to let you choose your font.

    1) Editing the outline file, e.g., Shalom-OldStyle.font/Shalom-OldStyle:

    The original used "ShalomOldStyle" as the font's name, full name, and family name. We want the name to be "Shalom-OldStyle", the full name "Shalom Old Style", and family name just "Shalom".

    First, find the lines:

    /FullName (ShalomOldStyle) readonly def
    /FamilyName (ShalomOldStyle) readonly def

    and change them to:

    /FullName (Shalom Old Style) readonly def
    /FamilyName (Shalom) readonly def

    Then, replace all remaining occurrences of the string "ShalomOldStyle" with "Shalom-OldStyle".

    2) Editing the AFM file, e.g., Shalom-OldStyle.font/Shalom-OldStyle.afm.

    Find the lines:

    FullName ShalomOldStyle
    FamilyName ShalomOldStyle

    and change them to:

    FullName Shalom Old Style
    FamilyName Shalom

    Replace all remaining occurrences of the string "ShalomOldStyle" with "Shalom-OldStyle".

    Repeat this procedure for the remaining typefaces.

  • You now have a font family ready to be installed. If the font family is to be used by your account only, place it in /Library/Fonts (creating it if necessary):

    mkdirs ~/Library/Fonts
    mv Shalom-*.font ~/Library/Fonts
    buildafmdir ~/Library/Fonts

    If everybody on your system should have access to this font family, place it (as superuser) in /LocalLibary/Fonts:

    mkdirs /LocalLibrary/Fonts
    mv Shalom-*.font /LocalLibrary/Fonts
    buildafmdir /LocalLibrary/Fonts
That's all you need to do for fonts generated by Fontographer version 3.2 or above. This will work with all applications that use AppKit's FontPanel. FrameMaker does not, so other changes may need to be done to keep FrameMaker happy [does anybody have something to add here?].

Fonts generated by Fontographer version 3.1 or below don't work in Display PostScript as they are, because they use a memory management trick that screws everything up in a multitasking environment like DPS. However, there is a simple, though kludgy, way to make them work.

The problematic trick uses a dictionary with a name like "Fog3.1" ("Casa1" in Casady & Green's fonts) in which most of the font resides. The problem is that Fontographer puts that whole dictionary into dictionary 'userdict' and expects it to stay there. DPS, however, clears out 'userdict' between tasks, including the task that loads the font and the task that uses it. This makes the font useless on the screen, and printable only by prepending the outline font file to the file you want to print and sending the result to print in one task.

The fix is to move the troublesome dictionary from 'userdict' into the font dictionary itself (unlike 'userdict', the font dictionary does stick around between tasks).

Perform the following changes in the outline font file (the font CyrillicGothic is used as the example):
  • Find the line "%%EndProlog". It will be followed by the line like this:

    /\$CyrillicGothic 23 dict def \$CyrillicGothic begin

    Write down the number before 'dict' (in this case, 23). You will need it in the following step. Delete the dict definition, making the line look like this:

    \$CyrillicGothic begin

  • Go back to the beginning of the file. near the top of the font program, find the following lines:

    userdict/Fog3.1 known\{\{currentfile( )readstring
    \{(\%\%\%)eq\{exit\}if\}{pop exit\}ifelse\}loop\}if
    userdict begin/Fog3.1 45 dict def Fog3.1 begin

    and replace them with these:

    /\$CyrillicGothic 24 dict def
    \$CyrillicGothic begin/Fog3.1 45 dict def Fog3.1 begin

    The number before 'dict' (in this case, 24) is one greater than the number you wrote down in the previous step.

  • Find the line that defines procedure BuildChar:

    /BuildChar{Fog3.1/BuildChar get exec}def

    and change it as follows:

    /BuildChar{1 index begin Fog3.1/BuildChar get exec end}def

  • Go to the end of the file. The last line looks like this:

    /CyrillicGothic findfont/EFN get Fog3.1 begin\{RF\}forall end

    Delete it (or comment it out by placing one or more " beginning of it).

    The AFM file requires one adjustment. Change the line

    EncodingScheme AppleStandard


    EncodingScheme AdobeStandardEncoding
This concludes conversion of a font generated by Fontographer version 3.1 or lower to work with NEXTSTEP. You may still need to make the changes described for version 3.2 and above, to make the font fit the NEXTSTEP font panel.

Short note: under NEXTSTEP 3.3 there is no need to call buildafmdir by hand. It's triggered automatically by the Font panel.

8.8 What color printers (laser or otherwise) may be used with NEXTSTEP?

printer, color

The (no longer sold) NeXT/Canon SCSI color printer, of course!

With Dots Color, the HP DeskJet 500C can print in color today, under NEXTSTEP 2.1, and it costs significantly less than $1000 (in Germany at least).

In Germany you can get more information from:

d'ART Software GmbH
Virchowstr. 17-19
W-2000 Hamburg 50
Voice: +49 40 380 23 0
Fax: +49 40 380 23 290

JetPilot from Interpersonal Computer does this jobs also very well.

You can get more information from:

interpersonal computing GmbH
Oettingenstrasse 2
W-80538 Muenchen
Voice: +49 89 22 28 63
Fax: +49 89 22 33 76

8.9 How can I make the Page Layout default to A4 in all applications?

A4 default size

Add "NXPaperType A4" in the "GLOBAL" preferences.

8.10 /usr/lib/NextPrinter/Server/pstf: syntax error at line 31: `end of file' unexpected?

Using lpr -t, or lpr -d causes this problem. eg:

cat /usr/lib/NextPrinter/Server/pstf

Christopher Lane has pointed out 3 (three!) errors in the distributed NEXTSTEP 3.0 lpd.comm file.

The last change is my own. It worked for the 1 (one!) dvi file I tried.

tilley\% diff lpd.comm.DIST lpd.comm

< while "x\$1" != x do
< case "\$1" in
> while test \$\# != 0
> do case "\$1" in
< -h) HOST=\$"; shift;;
> -h) HOST=\$2; shift;;
> esac
< PRSERVER="/usr/lib/NextPrinter/Server/prserver -p \$PRINTER -n \$USER -h HOST -f -"
> PRSERVER="/usr/lib/NextPrinter/Server/prserver -p \$PRINTER -n \$USER -h \$HOST -f -"
< psdf) psbad \$FILTER \$PRINTER \$USER \$HOST | \$PRSERVER;;
> psdf) dvips -f -D 400 -r | \$PRSERVER ;;

8.11 How to get TeX with NEXTSTEP to make proper fonts for a 600 dpi laserwriter?

600dpi TeX fonts
TeX, 600dpi

If you upgrade to a 600 dpi laserwriter then the version of TeX that ships with NEXTSTEP (either 2.X or 3.0) does not know about 600 dpi fonts, i.e. does not know how to make them and will instead use scaled 400 dpi ones (which look significantly worse at 600 dpi than they do at 400 dpi). Some simple modifications to a few Metafont files and rebuilding the metafont bases are all that is needed. What to do to get the 600 dpi stuff working is as follows:
  • Edit /usr/lib/mf/inputs/next.mf and add a laserjetIV mode. Simply copy the entire imagen mode, change the name to laserjetIV, and change the pixels_per_inch to 600. Save the changed file.

  • Build a new mf.base file by executing the following commands:

    inimf "plain; input next; dump"
    (as superuser): cp plain.base /usr/lib/mf/bases/mf.base

  • Edit /usr/lib/tex/ps/config.ps and change the `D 400' line to `D 600' (you may have `D 300' or something else if you've set up a different printer.)

  • Edit /usr/bin/MakeTeXPK (as superuser), adding the lines

    elif test $BDPI = 600

    right before the second `else' in the file.
That should do it! You might have to (depending on how you configure NEXTSTEP for the LaserJet IV) select `custom resolution' and set the gadget to 600 in the TeXview print panel, and save Preferences. These instructions are written for an HP Laserjet IV, but they should also work for a QMS printer just fine.

Finally, if you have one of these printers and work in a "mixed" environment with perhaps 400 dpi and/or 300 dpi printers that you also print to on a regular basis then you might want to consider getting Type 1 PS version of the Computer Modern fonts instead. They obviate the need for the instructions above, and the savings in disc space will be considerable since having printer fonts for several printers takes lots of room, and the file sizes for 600 dpi are quite large (the files grow roughly as D logD, where D is the resolution). These fonts are made by Blue Sky Research, and work beautifully. Y&Y software is a reseller for BSR and sells a "NEXTSTEP specific" version of them which comes with appropriate instructions and installation scripts.

8.12 How to get printer description files (PPD)?

PPD, where?
printer description files, PPD

Adobe has a mail server and ftp site where you can get .PPD files. They are:

ps-file-server@adobe.com (put "send help" in the mail body)

8.13 What are the Canon part numbers for ink cartridges equivalent to those NeXT's Color Printer uses?

ink cartridge, Canon
Canon, ink cartridge

Part Numbers are:

Red: BJI-643 M
Yellow: BJI-643 Y
Blue: BJI-643 C
Black: BJI-643 Bk

8.14 JetPilot does not work with my JetDirect box, why?

JetPilot, JetDirect
JetDirect, JetPilot

It seems, that there is a bug in the /etc/rc-script. The bootpd is given with to arguments -a -f, which are not available for the bootpd under 3.3.

Make an entry in /etc/bootptab like this:

\# host htype haddr iaddr bootfile

  • host: your given hostname for the printer (eg. picasso)
  • haddr: The Ethernet hardware address (Can be seen, if you press the TEST-Key on your JetDirect box)
  • iaddr: Is the hostaddress for the printer (eg.
Entries have to be done also in the Netinfo-database. It's like adding a new host.

Insert the following line to your etc/rc.local script:

\# Starting JetDirect-Printer configuration
fbshow -B -I "Starting Printer initialization" -z 92
/usr/etc/bootpd -d /etc/bootptab >/dev/console 2>\&1

There is an additional FAQ available at: ftp://ftp.gscorp.com/pub/support/HP_JetDirect_Configuration.tar.gz

8.15 powering down NeXTprinter during bootup, printer still works

power down, printer
printer, printer down

Type the following to your rc.local.

\#turn off NeXT laser printer.
fbshow -B -I "Powering off NeXTprinter" -z 95
if [ -f /usr/etc/nppower ]; then
  sleep 3
  /usr/etc/nppower off
  (echo 'powering off NeXTprinter') >/dev/console

This works fine... the printer powers down immediately, and is available for any app which wants it.

8.16 How to set up the HP LaserJet 4M?

HP Laserjet 4M

I solved the problem by building a serial cable based upon the pinouts supplied by HP in their manual. Please note that the LJIII cable does not work. In particular, pin 1 from the DIN plug must be connected to pin 6 of the DB25. I used 38500 bps on both sides, and the 600 dpi ppd.

Emulex offers the NETJet network interface which speaks lpd protocol, unlike the HP unit.

8.17 Laserwriter NTX & NEXTSTEP

Laserwriter NTX

This are the pin assignments.

Eight-pin mini DIN-8 RS-422 Port
Pin  Signal Description

1,3  SG     Signal Ground
4    TxD+   Transmit Data +
5    TxD-   Transmit Data -
8    RxD+   Receive Data +
9    RxD-   Receive Data -

IBM-compatible DB-25  LaserWriter DB-25
Signal     Pin        Pin      Signal

Shield    1 ............ 1     Shield
TxD       2 ............ 3     RxD
RxD       3 ............ 2     TxD
RTS       4 ............ 4     RTS
CTS       5 ............ 5     CTS
DSR       6 ............ 8     DCD
GND       7 ............ 7     GND
            ............ 20    DTR

The other aspect is to set the DIP switch on the printer. Here are the DIP switch settings:

Switch1 Switch2 Meaning

UP      UP      LocalTalk---RS-232 disabled
DOWN    UP      Serial ports at 1200 Baud
UP      DOWN    Serial ports at 9600 Baud
DOWN    DOWN    RS-232 at 9600 Baud; RS-422 at 0 Baud

Switches 3 and 4 can probably be ignored---they're for strange stuff like Diablo 630 and HP LaserJet emulation modes.

Switch5 Switch6 Meaning

UP      UP      XON/XOFF
UP      DOWN    DSR

8.18 Problems with gray levels in printout

gray levels
color space
PS Level2

If you have problems with your shades of gray (e.g. light gray is indistinguishable from white) this might be well a problem in the Level2 Color Space calibration of your printer.

To ensure, it's a problem of your printer (and not a problem of the printer driver or PPD file) try the following:
  • Save a printout to a file

  • Edit the following line in your printout file:

    /\_NXLevel2 systemdict/languagelevel known {languagelevel 2 ge}{false}ifelse \_\_NXdef


    /\_NXLevel2 false \_\_NXdef

  • Send the modified file directly to the printer using the commandline command lpr.
If you still have problem with the shades of gray, the printer driver/PPD file is probably broken, otherwise your printer is broken, which means he has problems with the Level2 color space calibration (The given correction turns PS Level2 off).

8.19 Can't print using additional fonts

printer, fonts

In rare circumstances some printers refuse to print, if they don't recognize a font. In these cases add the _nxfinal form property to the printer's property list with NetInfo.
번호작성자날짜조회제    목
11capri912001-03-2619145   [NeXT_FAQ] 09_Obsolete but still interesting
10capri912001-03-2611434   [NeXT_FAQ] 08_Printing
9capri912001-03-2612045   [NeXT_FAQ] 07_Storage
8capri912001-03-2616104   [NeXT_FAQ] 06_White (Intel) hardware
7capri912001-03-2685520   [NeXT_FAQ] 05_Black (NeXT) hardware
6capri912001-03-2613682   [NeXT_FAQ] 04_Miscellaneous information
5capri912001-03-0610519   [NeXT_FAQ] 03_What is
4capri912001-03-0628320   [NeXT_FAQ] 02_General information
3capri912001-03-0630487   [NeXT_FAQ] 01_Introduction
2capri912001-03-0610359   [NeXT_FAQ] 00_Contents
1capri912000-12-1311398   <공지> Documentation 게시판의 용도
[목록보기] [글쓰기]