Subject: Re: printing to Xerox 230 ST
To: None <netbsd-help@netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-help
Date: 06/17/1999 09:46:35
> > You can also put a filter in the printers data stream. Just add a
> > if=/usr/local/sbin/myfilter to the /etc/printcap and put a <nl> to
> > <cr><nl> filter in that file. (eg. sed -e 's/$/^M/')
>
> Won't that also modify Postscript files? Does that matter? I must admit
> that I use the enscript package to send text files to our HP printers.
> I've only just noticed that they also suffer when sent LF-only text.
I was somewhat hesitant at slapping a ^M at the end of ps files also.
Thats why I used the printer's builtin ^M hacking which applies to PCL
only. (The PCL half of things is what prints "plain ascii" when it is
sent to the printer.)
It should be ok to add ^M to the end of lines for ascii ps files. I'm
told that there are programs that can send raw binary picture data to
a postscript interpreter. I'm sure that adding a ^M after every ^J
would make a royal mess of things there. Luckily I've never seen a
program output a ps file with embedded binary data. All the output
I've seen has constructed picture data from either pure hex data or
some other printable representation.
I'm not exactly sure how a ps with binary is constructed so that among
other things the terminating ^D still terminates the file but embedded
^D's don't.
If one does need to print ps files with binary data in them, its
probably best to only apply the filter if the first two chars of the
file is not "%!".
-wolfgang
--
Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
http://www.wsrcc.com/wolfgang/
DGPS signals via the Internet http://www.wsrcc.com/wolfgang/gps/dgps-ip.html