[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] postscript info needed.



hi,
I figured out the part about collating copies - the hard way, about 3
hours after the posting ;)

Anyways - to clarify, I am using the samba print accounting scripts.
However, they do not know how to pick up the page count either, I've had
to hack them to work this far...
<code snippet from lp-acct>

while (sysread(STDIN, $buf, 10240)) {
        print $buf;
        $cnt += ($buf =~ /^L/g);
}
</code snippet>
As you can see, the technique used to pick up the page count is scarcely
effective. I've modified this slightly to pick up the page count from

%%Pages: 10

(this is a tag in the postscript file)

So now my question is even simpler, if if the postscript file does not
contain and indication of the number of pages, then how does the printer
know how many copies to print ? I presume that the application first sends
some control characters which sets the number of copies to be printed on
the printer (I picked this up from hp.com, they have a neat javascript
page that writes a page full of control characters to configure your
laserjet if you don't/can't run the GUI configuration thingy), and then
sends the print job.

Assuming my assumption is true,
How do I intercept these control characters before they get to the
printer, so that I can account for them ?

If my assumption is false, then what's the next step for me?

I'm thinking now mine isn't a postscript interpretation problem.
Arun told me to try comp.lang.postscript., which brings me to another
topic - I don't have access to a news server (other than going through
deja news). How do I read news ? (I'd like to set up a limited usenet
server here)

thanks,

nikk

PS. My college charges people Rs. 2 per page, so accuracy and security
is important.


     
On Sun, 5 Dec 1999, Jiju Thomas Mathew wrote:

> >both applications, then *boom*. MS Word correctly (?) reports the number
> >of pages in the document as 6*6=36, however wordpad shows up only 6, with
> >no indication of the number of copies anywhere in the raw ps file.
> >
> 
> 
> wordpad does not have a facility for collating so it sends the number of
> copies in the header, and then the page data.  whereas word defaults to
> collating, so the number of pages per job will be shown as 36, while for wp,
> it will be six.
> 
> Try from word when printing use collate off, then test :)
> 
> go ahead and find the script from samba/examples/printer-accounting, try
> using that.
> ----------------------------------------------------------------------------
> ----------
> Jiju Thomas Mathew
> see my jpeg post cards based on linux : http://digitel.webjump.com/cards.htm
> Linux registered user #154193
> 
> --------------------------------------------------------------------
> The Linux India Mailing List Archives are now available.  Please search
> the archive at http://lists.linux-india.org/ before posting your question
> to avoid repetition and save bandwidth.
> 

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.