Pages in a printjob

John E. Malmberg wb8tyw at
Fri May 24 07:31:01 GMT 2002

> On Fri, May 24, 2002 at 02:55:58PM +0200, Wichert Akkerman wrote:

>I'm working on a system where customers have to pay for pages they
>print, and as such it is essential that I have the pagecount of
>a printjob before I send it to the printer.

This is a difficult thing to do accurately.

For plain text, it is bad, as you must take into account imbedded escape 
  sequences which can vary widely with printers, line wraps, and normal 
line counts and form feeds.

For PostScript printers, the only way to get an accurate count is to 
query the printer at the end of the print job.  And guess what?  The 
query is printer model specific.

Graphic bit maps may not be possible to estimate where the page breaks are.

A Microsoft Windows program can give a pagecount because it sends the 
print job to the Windows spooling system as metadata, that is rendered 
by the driver.

If the print job is sent as raw data to the printer, then all of this is 
bypassed, and the spooler has no idea how many pages are really being 

If you could charge by the killobyte sent to the printer, that could 
probably done accurately.

With laserprinters under heavy load, the ink density of the page as a 
direct relationship to the rate that you go through some expensive 
printer supplies.

wb8tyw at
Personal Opinion Only

More information about the samba-technical mailing list