Filters and no pages found
Anonymous
anonymous at easysw.com
Thu May 19 07:55:20 PDT 2005
Hi all,
I'm starting to understand cups, yet I can't figure out this problem. I want to add comments to plain text printouts. I added my scripts, types and conversion, but something breaks along the way.
foo.types:
application/a-foo printable(0,1024) + contains("Company Name")
foo.convs:
application/a-foo text/plain 0 /usr/local/bin/foo.pl
foo.pl:
#!/usr/bin/perl
if (-e $ARGV[5]) {
open fh, "$ARGV[5]" or die;
while(<fh>) {print "my commets: $_";}
close fh;
}
else {
while(<>) {print "my commets: $_";}
}
When I do a print, cups recognizes it, and calls foo.pl. But I see the error, and nothing gets sent to printer except 4 bytes. All I'm trying to do is added extra text to the printjob. I want the default filters do the rest. I know the script reads the spooled job because I can write it to a temp file. So... 1) the type is recognized 2) the script is called 3) I think I'm missing something in the script. In the log files, I see a missing file /usr/bin/gs, but doesn't cups have its own esp ghostscript? And I've been able to print plain text without it... Thanx for reading this.
--
ROME
More information about the cups
mailing list