Printing from NeXT through Cups (to a Canon)

NeXT Computer, Inc. -> NeXT Work Logs

Title: Printing from NeXT through Cups (to a Canon)
Post by: rooprob on April 04, 2018, 12:40:10 AM
Hi,

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,


Quote^D%!
%!PS-Adobe-2.0
%%Title: testpage.ps
%%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

#!/bin/sh
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 ....
Title: Printing from NeXT through Cups (to a Canon)
Post by: nextchef on April 04, 2018, 12:43:31 PM
Nice hack (in the traditional definition) to get things working!

Will have to file this thread away for future reference.

Go to top  Forum index