[comp.sys.sun] Quotas on printing PostScript files

corwin@talcott.harvard.edu (-David C. Kovar) (02/09/89)

>Is there anyway to implement a quota mechanism on print spoolers that
>would limit the size of otems that could be sent to the printer??
>...

--wnl:
>Well, there is a printcap capability called "mx" which sets the maximum
>allowable file size (in file system blocks) for queued files....  --wnl 

There is no elegant solution for this at the moment, at least as far as I
know. The problem is that you're sending PostScript to the LaserWriter.
PostScript is essentially a programming language, not just an
encapsulation of whatever text you want to send. If all you're doing is
sending normal text to the LaserWriter then the size of the file being
sent will probably be indicative of the number of pages. However, if
you're sending graphics, such as anything created by a paint program,
you'll find that thirty lines of PostScript can generate thirty pages of
paper. Worse still, I can write fifty lines of PostScript that will tie up
the LaserWriter for twenty minutes as it tries to print it. You may run
into more time problems than number of page problems. If the program
you're using that generates the PostScript follows the conventions,
there's liable to be a page count in the header of the file. If you look
near the top of the file, you may find a line that looks like: %%Pages:
<n> Sounds like you're going to have to write your own filter....

-David C. Kovar
	Technical Consultant			ARPA: kovar@husc4.harvard.edu
	Office of Information Technology	BITNET: corwin@harvarda.bitnet
	Harvard University			MacNET: DKovar
						Ma Bell: 617-495-5947

ken@cs.rochester.edu (Ken Yap) (02/15/89)

However if you are running Transcript or a similar package you can ask the
printer how many pages were printed and how long it took and "bill" the
users for that. Still doesn't solve the problem of somebody tying up the
printer for 20 minutes though.