PDA

View Full Version : Printing from remote machine returns incorrect page numbers


Thomas Wopienka
August 13th 03, 10:02 PM
Hello!

I hope this is the correct newsgroup for this question - I couldn't find any
developers newsgroup for this topic.

I wrote a program using API to monitor a printer queue on a Windows 2000
Server. It monitors all printjobs that are being printed and stores
important information like the number of pages printed,... in a database.
Monitoring printjobs that are being printed locally is no problem - all the
fields are filled with the correct information. If a user prints a document
from a Windows 2000 client machine using Word2000 or Notepad I also get all
information (but there is a problem in one specific case).

Windows 2000 Server local printjob (OK)
Word document has 1 page - I print 100 copies
Result is: Pages Printed: 1 - Total pages: 1 - Copies: 100 (In this case
I can at least calculate the number of pages printed)

Windows 2000 Client using shared printer from Windows 2000 Server
(PROBLEM!!!)
Word document has 1 page - I print 100 copies
Result is: Pages Printed: 1 - Total pages: 1 - Copies 1 (????)

and even more confusing

Windows 2000 Client using shared printer from Windows 2000 Server (OK)
Word document has 2 pages (more than 1 is enough) - I print 100 copies
Result is: Pages Printed: 200 - Total pages: 1 - Copies 1 (This is also OK
for me since I just want to know the number of pages printed)


Both server and client are running Windows 2000 SP4
Office verison is 2000 with all SPs but this shouldn't matter since it also
happens using notepad,...

Also when watching the printer queue in Windows you can see the same
information that I explained above.

Why does Windows tell that there is just one page printed even if I print
100 copies from a client machine using the shared printer?
Is this a bug - and is there a hotfix or some sort of workaround for this?

Thank you for your help!


Thomas

Feng Yuan [MSFT]
August 14th 03, 07:49 AM
Are you saying when you print 100 copy of a single page document using
notepad from 2000 client machine to 2000 server using shared printer, only
one sheet of paper is printed out?

If this is the case, it's definitely a bug. Does this happen on multiple
printer drivers?

--
Feng Yuan (www.fengyuan.com)

This posting is provided "AS IS" with no warranties, and confers no rights.

Thomas Wopienka
August 14th 03, 07:11 PM
Hi!

No this is not the case.
When I print 100 copies of a single page from 2000 client to 2000 server I
get 100 pages printed BUT the printer information I get using Windows API to
monitor the printer is that just 1 page has been printed.
If I print another document that consists of 2 pages making 100 copies I get
200 pages returned from the monitoring functions.

This happens with many different drivers that's why I think it is a problem
somewhere else.

Thomas

"Feng Yuan [MSFT]" > wrote in message
...
> Are you saying when you print 100 copy of a single page document using
> notepad from 2000 client machine to 2000 server using shared printer, only
> one sheet of paper is printed out?
>
> If this is the case, it's definitely a bug. Does this happen on multiple
> printer drivers?
>
> --
> Feng Yuan (www.fengyuan.com)
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>

Carey Gregory
August 17th 03, 10:56 PM
"Thomas Wopienka" > wrote:

>Hi!
>
>No this is not the case.
>When I print 100 copies of a single page from 2000 client to 2000 server I
>get 100 pages printed BUT the printer information I get using Windows API to
>monitor the printer is that just 1 page has been printed.
>If I print another document that consists of 2 pages making 100 copies I get
>200 pages returned from the monitoring functions.
>
>This happens with many different drivers that's why I think it is a problem
>somewhere else.

The GetJob function does not reliably report number of copies, and this
problem isn't limited to the 2000 client/server configuration. I know of
no way to obtain this information reliably, but I would welcome anyone
showing me I'm wrong.


--
Carey Gregory
Windows Print Drivers & Components
http://www.gw-tech.com

Google