Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using windows print spooler notification functions, as FindFirstPrinterChangeNotification, FindNextPrinterChangeNotification to get JOB_NOTIFY_FIELD_TOTAL_PAGES, JOB_NOTIFY_FIELD_PAGES_PRINTED values. The total number of pages obtained, is not showing the correct value when I am printing multiple copies (>1) of the selected page, but the actual number of pages sent for printing. It is really troubling me since 3 days now :(

Edited:

Taking an example, if I have a document of 10 pages and I give a print of more than 1 page of the document, (eg. Page 1, 4) asking for 4 copy each then the return value I obtain is:

JOB_NOTIFY_FIELD_PAGES_PRINTED = 8
JOB_NOTIFY_FIELD_TOTAL_PAGES = 2

But if I give print of a selected single page (or current page) and ask for 4 copies of it, then the return value I obtain is:

JOB_NOTIFY_FIELD_PAGES_PRINTED = 1
JOB_NOTIFY_FIELD_TOTAL_PAGES = 1

But, the printing does takes place in all the printers (Epson/ HP/ Canon) I have tried.

I do feel, that printer setting is having some influence over my result. Frankly, I don't know.

The printer setting are as follows:
Priority: 1
Selected: Spool print documents so program finishes printing faster
Selected: Start printing after last page is spooled

Selected: Print spooled documents first
Selected: Enable advance printing features

It would be really kind of you to give your guiding suggestions.

With thanks
Mukul Kumar
Posted
Updated 15-Jun-13 3:12am
v3
Comments
[no name] 16-Jun-13 22:10pm    
This appears to be expected behaviour.
See the epilogue in this article:
http://www.codeproject.com/Articles/74359/Ask-for-and-receive-change-notifications-from-a-pr
Mukul Kumar, Programmer 17-Jun-13 4:08am    
Its really your kindness to provide me your able guidance to me. I would be going through the link provided by you and check out my mistakes. Actually one of the main function of the program is to get the printed paged details... feeling quiet defeated in the present scenario with time constraints there on.

My respects,
Mukul Kumar
Mukul Kumar, Programmer 17-Jun-13 18:27pm    
Tried the given options and the codes on the suggested link, Sir. But it was all in vain. Same problem still persist, as u have told (an Expected Behaviour). I can not get the printer details either. Only option at present is to disable the copies option of the Print Dialog, under the given constraints. Being new to windows programming, unable to do it. Sir, please help me to disable the copies option in the Print Dialog at runtime.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900