Printing from NeXT through Cups (to a Canon)

Started by rooprob, April 03, 2018, 11:40:10 PM

Previous topic - Next topic



This was weird, but setting up jetdirect through xinetd (google it) should have "just worked".  

That is to say, NeXT configured to print with any postscript printer - I think I chose a HP Laserjet 4 Postscript. My linux box has a Canon MP980 which isn't postscript, so I have to have cups fake a Jetdirect port and then it magically does the right thing rendering postscript through ghostscript.

Anyway, for me it didn't.  Printing locally was fine. But NeXT, printing via Jetdirect 9100/tcp did nothing.  On closer inspection of the cups spool, the failed postscript files had a ^D as the first character, like this,

%%Creator: Tailor
%%CreationDate: Mon Apr 18 16:38:16 1994
%%For: jyaksick
%%DocumentFonts: (atend)
%%Pages: 1 1
%%BoundingBox: 28 30 584 762
%%DocumentPaperSizes: Letter

So I modified the xinetd config and changed the "server" to a filter,

service jetdirect
       socket_type = stream
       protocol = tcp
       wait = no
       user = lp
       group = lp
       # server = /usr/lib/cups/daemon/cups-lpd
       # server_args = -o document-format=application/octet-stream
       server = /bin/nextjet
       # server_args = -o raw
       disable = no

where /bin/nextjet was

sed 's,^D,,' | lp

And now I have a nice test postscript print out from 1994.  Feels like I'm looking at something nobody else has seen for long time ....
:O2: r12 400 mapleleaf :Indigo2IMP: r10 195 IRIS :SlabMonoTurbo: NeXT
New Zealand


Nice hack (in the traditional definition) to get things working!

Will have to file this thread away for future reference.