Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Windows
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 Frown | :(
 
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 13-Jun-13 19:32pm
Edited 15-Jun-13 4:12am
v3
Comments
pwasser at 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 at 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 at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 15 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100