How to remove ^L from print job?
Helge Blischke
h.blischke at srz.de
Mon May 2 05:41:24 PDT 2005
Insert a statement like this into your printer's PPD:
*cupsFilter: "text/plain 0 kill_ff"
where kill_ff is a nice little script, located in your CUPS's filter
directory, which
just kills the leading ^L. This script could look like this (not
tested):
---snip---
#!/usr/bin/perl -w
$textfile = $ARGV[5];
if (defined $textfile)
{
open (INPUT, "<$textfile") || die ("ERROR: $textfile: $!\n");
}
else
{
open (INPUT, "<&STDIN") || die ("ERROR: STDIN $!\n");
}
$leading_stuff = 1;
while (<INPUT>)
{
if ($leading_stuff && $_)
{
if (/^\014/)
{
s/^\014//;
$leading_stuff = 0;
next if (length ($_) == 0);
}
}
print;
}
exit 0;
---snip---
Helge
Anonymous wrote:
>
> I'm using a Lexmark T630 w/ a t616 driver. I get the job in plain text from the mainframe already formated. I see a ^L at the begining which causes a blank sheet in front of every job.
>
> > Anonymous wrote:
> > >
> > > I have a job coming from a mainframe that has a ^L in the beginning of a text job that is causing a blank page to print first. How can I remove it? We have no control from the job source so we have to strip the ^L from our side.
> >
> > What printer are you using, how do you feed the jobs in from your
> > mainframe?
> > Depending on that configuration there are several possibilities.
> >
> > Helge
> >
--
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
More information about the cups
mailing list