GetJob function returns incorrect value for number of pages printed

  • Thread starter Thread starter vijay
  • Start date Start date
V

vijay

Hi I am developing port monitor for printer monitor
I want to log number of pages printer by user.
So in EndDoc callback function I use GetJob with Job_info_2
I am using Job_info_2.TotalPages member variable to get that information.
When I print 1 page with multiple copies. this member containes 1 instead of
number of copies.
For more than one page it reports correct number.

vijay
 
Total pages also gives incorrect value(e.g. 1 page and 5 copies gives 1 in
totalpage).
Actually what I want is Totalpages printed
but as it was giving me incorrect value I turnd to devmode->dmCopies field
but this too gives me incorrect value.

From web I have figured out that many person is having same problem.
So Microsoft must do something to solve this problem. As in corporate
invironment resource management is crusial things and if application written
for monitoring printer activities can not report correct things
then this is major issue and Microsoft must solve it as early as possible.

vijay
 
Ben Kuhn said:
PagesPrinted refers to the number of pages spooled. Depending on the app
that you spool from, the application may actually spool mutliple copies of
the document instead of letting the print system handle the copy count (this
give the application control over page order accross copies, for example to
simulate collation) for example, if the application is simulating
collation). That may be what your seeing for cases where it seems to work
correctly.

Regardless, the field that you want to look at is TotalPages.

--
Ben Kuhn

Please do not send email directly to this alias. This alias is for newsgroup
purposes only. This posting is provided "AS IS" with no warranties, and
confers no rights.
instead
 
Back
Top