Print Queue displays

Dan Kaminsky effugas at
Mon Apr 5 15:46:42 GMT 1999

> Here's a very low priority request.
> Currently samba doesn't support displaying the number of pages to
> be printed when showing the print queue.

Samba has a number of issues with print queues, not the least of which are
no way of passing meaningful print descriptions from one client to
another.  Jeremy said he'd look into it if I could scrounge up some logs,
but I've been a lazy bastard.  D'oh...
> I was going to try and do this myself, and added a field (int pages)
> to the print_queue_struct structure ( include/smb.h ), and writing a
> custom print queue parser ( selected by 'printing = custom' in
> smb.conf ), but I dont know how to add the extra information to the
> returning packet ( somewhere in smbd/ipc.c:fill_printjob_info ? ).

Sniff, try to copy, repeat until brown.
> Just thought it would be relativily easy to do, since most NT print
> drivers convert their print jobs to postscript, its easy to work out
> the number of pages to be printed, by counting the number of times
> 'showpage' is called in the postscript document.

Whooaaaaa, *NOT* that easy.  Windows as a postscript system is, shall we
say, "tweaked hard".  Andy Bakun knows more about this than I do, but it
seems that each "postscript driver" has its own conversions going on.
Nawt Good.

Anyway, any solution we implement should NOT examine the datastream.
Windows usually knows how many pages it plans to print before it does
so--we need to find the IOCTL(?) that represents this and trace its

> Bj
> +-------------------------------+--------------------------------------+
> |      Benjamin (Bj) Kuit       |  Faculty of Mathematical             |
> |      Systems Programmer       |          and Computing Sciences.     |
> |      Phone: 02 9514 1841      |  University of Technology, Sydney    |
> |      Mobile: 0412 182 972     |  bj at                   |
> +-------------------------------+--------------------------------------+

More information about the samba-technical mailing list