Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2000 19:02:58 -0600 (CST)
From:      Mike Meyer <mwm@mired.org>
To:        "Thomas L." <tmliaw@pc.jaring.my>
Cc:        questions@freebsd.org
Subject:   Re: Count page in lpr output
Message-ID:  <14864.36674.387751.668888@guru.mired.org>
In-Reply-To: <40585539@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Thomas L. <tmliaw@pc.jaring.my> types:
> Hi!
>     It is possible to get the number of page of a print file for lpr from
> the print queue before the print file being printed out?  I am working on a
> project  where I have to capture the print out submitted through lpr, count
> the number of page of the print job, show it to the end user on another
> workstation, only then print the submitted print job when the user press ok.

Well, page counting in lpd is normally done via the accounting filter
(if in printcap), but that's if you want to *log* the page count. It's
expected to finish in a timely manner, so having it wait for a human
user may screw things up.

If you want the user who *submitted* the job to ok it being printed,
you should just put a wrapper around the lp/lpr commands. If you want
another human being to approve the job being printed, the input filter
might be just the ticket. Or maybe you want to use the output filter
(of) instead.

Final note: counting pages can be *hard*.

	<mike




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14864.36674.387751.668888>