So can I create shell script which will be my filter to fix
the step affect problem of my output.
But wish to point the filter to a particular print queue I
have created.
Hope this makes sense.
>You can easily create a filter using cups. Create a new
backend in
>/usr/lib/cups/backend. This can be any executable,
including scripts. What
>cups will do is pass to this executable everything you
need to know about
>how to get the printed file to parse it. Your new
backend will then show up
>in your cups configuration as a new printer type. The
following is a little
>perl script we use to implement a printing dropfolder.
>
> #!/usr/bin/perl
>$argument_count = ARGV;
>if ($argument_count == 0){
>open OUTFILE,(">/tmp/cups.error");
>print "direct drop \"Unknown\"
\"Drop Folder\"\n"
>exit(0);
>}
>
>if (($argument_count < 5) || ($argument_count >
6)){
>open OUTFILE,(">/tmp/cups.error");
>print OUTFILE "Usage: drop job-id user title
copies options [file]";
>print "Usage: drop job-id user title copies
options [file]";
>exit(1);
>}
>
>$dropdir=$ENV{'DEVICE_URI'};
>$dropdir =~ s/drop://;
>unless (-w $dropdir){
>open OUTFILE,(">/tmp/cups.error");
>print "ERROR: directory $dropdir not
writable\n";
>print OUTFILE "ERROR: directory $dropdir not
writable\n";
>exit(1);
>}
>
>$cupsfile = $ARGV[5];
>`cp \"$cupsfile\"
\"$dropdir\"`;
>
>
>On 7/18/06, d.qureshi mdx.ac.uk <d.qureshi mdx.ac.uk> wrote:
>>
>> Does anyone know how to use a filter to format
print files to a printer?
>> I used printtool on RedHat AS 4 to create a print
queue. I am aware the
> printcap file
> cannot be editted to put a input filter.
> Any help would be appreciated.
> Thankyou.
>
> _______________________________________________
> rhn-users mailing list
> rhn-users redhat.com
> htt
ps://www.redhat.com/mailman/listinfo/rhn-users
>
--
Stephen Gilbert
RHCE - 804006953620491
--Boundary_(ID_HPOyFXvBamQs8i6gviL89A)
Content-type: text/html; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
Content-disposition: inline
You can easily create a filter using cups. Create
a new backend in /usr/lib/cups/backend. This can
be any executable, including scripts. What cups
will do is pass to this executable everything you need to
know about how to get the printed file to parse
it. Your new backend will then show up in your
cups configuration as a new printer type. The
following is a little perl script we use to implement a
printing dropfolder.
<br><br>
<meta http-equiv="CONTENT-TYPE"
content="text/html;
charset=utf-8"><title></title><meta
name="GENERATOR" content="OpenOffice.org
2.0 (Linux)"><meta name="CREATED"
content="20060718;7484100"><meta
name="CHANGED"
content="16010101;0">
<style type="text/css">
<!--
page { size: 8.5in 11in; margin: 0.79in }
P { margin-bottom: 0.08in }
-->
</style>
<p style="margin-bottom:
0in;">#!/usr/bin/perl<br>$argument_count =
ARGV;<br>if ($argument_count ==
0){<br>open
OUTFILE,(">/tmp/cups.error");<br
>print "direct drop
\"Unknown\"
\"Drop
Folder\"\n"<br>exit(0);<br>}
</p>
<p style="margin-bottom: 0in;">if
(($argument_count < 5) ||
($argument_count > 6)){<br>open
OUTFILE,(">/tmp/cups.error");<br
>print OUTFILE "Usage: drop
job-id user title copies options
[file]";<br>print "Usage: drop
job-id user
title copies options
[file]";<br>exit(1);<br>}</p>
<p style="margin-bottom:
0in;">$dropdir=$ENV{'DEVICE_URI'};<br>$drop
dir =~ s/drop://;<br>unless (-w
$dropdir){<br>open
OUTFILE,(">/tmp/cups.error");<br
>print "ERROR: directory
$dropdir not writable\n";<br>print OUTFILE
"ERROR:
directory $dropdir not
writable\n";<br>exit(1);<br>}</p>
;
<p style="margin-bottom: 0in;">$cupsfile =
$ARGV[5];<br>`cp \"$cupsfile\"
\"$dropdir\"`;</p>
<br><br><div><span
class="gmail_quote">On 7/18/06, <b
class="gmail_sendername"><a
href="mailto:d.qureshi mdx.ac.uk">d.qureshi mdx.ac.uk</a></b> <<a
href="mailto:d.qureshi mdx.ac.uk">d.qureshi mdx.ac.uk</a>>
wrote:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204);
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Does
anyone know how to use a filter to format print files to a
printer?<br>I used printtool on RedHat AS 4 to create
a print queue. I am aware the printcap
file
<br>cannot be editted to put a input
filter.<br>Any help would be
appreciated.<br>Thankyou.<br><br>_________
______________________________________<br>rhn-users
mailing list<br><a href="mailto:rhn-users redhat.com">rhn-users redhat.com
</a><br><a href="htt
ps://www.redhat.com/mailman/listinfo/rhn-users">
;https://www.redhat.com/mailman/listinfo/rhn-users</a&
gt;<br></blockquote></div><br><br
clear="all"><br>--
<br>Stephen Gilbert<br>RHCE - 804006953620491
--Boundary_(ID_HPOyFXvBamQs8i6gviL89A)--
--Boundary_(ID_BVrZ+kRCU1Ytv4vUwQhzpA)
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
_______________________________________________
rhn-users mailing list
rhn-users redhat.com
htt
ps://www.redhat.com/mailman/listinfo/rhn-users
--Boundary_(ID_BVrZ+kRCU1Ytv4vUwQhzpA)--
_______________________________________________
rhn-users mailing list
rhn-users redhat.com
htt
ps://www.redhat.com/mailman/listinfo/rhn-users
|