In article 5205@bme.ri.ccf.org, lapresto@bme.ri.ccf.org (Eric LaPresto) writes:
>In article <1993Dec13.210201.2689@bme.ri.ccf.org> lapresto@bme.ri.ccf.org (Eric LaPresto) writes:
>>I have an application that prints out in PostScript format, but
>>it's first character is always a ^D. This invariably screws up my
>>Postscript printer, which proceeds to print out pages and pages of
>>Postscript code. I've designed a simple sed filter to remove the
>>initial ^D without affecting the rest of the Postscript. This I
>>know works; I've tested it manually.
>>
>> % sed 's/^^D\(.*\)/\1/g' _file_
>>
>>I want to use this sed as an input (or output) filter as part of
>>my /etc/printcap file. I specified
>>
>> :if=/etc/sed.script
>>
>>within the printcap entry, with the contents of file /etc/sed.script:
>>
>>-----------------------------------------------
>>#!/bin/csh -f
>>#
>>cat | sed 's/^^D\(.*\)/\1/g'
>>#
>>exit 0
>>-----------------------------------------------
>>
>>File mode is 755, permissions are root.daemon.
>>
>>I've found that this input filter file is not working. It seems like
>>it is not even being evaluated. Any ideas?
>
>Based upon the advice that filters set up for a remote printer will
>only be executed on that printer's local machine, and the fact that
>I was trying this filter from a remote machine, I set out to develop
>a filter for that local machine (also Sun sparc, 4.1.1). I couldn't
>use my original sed filter, because this printer is a SPARCprinter
>with its own set of input filters (using PreLimm).
>
>I first created a new "file" type in the /etc/magic file:
>
>0 string ^D%! Windows Postscript document
>
>And then in the PreLimm file "pl.sun4/.pl_alias" I defined a new
>alias:
>
>ps Windows Postscript document
>
>Now when the input filter recognizes the input job as a "Windows
>Postscript document", it gets passed through as a Postscript file and
>not as an ASCII text file.
>
>Thanks to all those people who offered suggestions!
Another solution is to add a "ctrld=0" in the appropriate sections of
the WIN.INI file so that the leading control-d does not get generated
in the first place from the MS Windows postScript driver. This is a lot
easier, and the way I do things. If you need more info, please send
e-mail and I will provide the exact instructions.
Z
-- ------------------------------------------------------------------------- | Syed Zaeem Hosain P. O. Box 610097 (408) 441-7021 | | Z Consulting Group San Jose, CA 95161 szh@zcon.com | -------------------------------------------------------------------------
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:33 CDT