Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 5 Jun 2008 13:39:47 +0100,    group: microsoft.public.platformsdk.gdi        back       


Printing Problem. GetJob, JOB_INFO_1, TotalPages   
Hi

I have a project with C++ hooking of API calls and a customised printer 
driver.
The purpose of these is 2 intercept users printing requests and
1. Pop up a dialog asking them to select a classification for their 
document.
2. Record event to the event log saying userName, document title and 
crucially, number of pages printed.

Background

I am having a problem recently discovered with '2'.
As part of our solution, in the hooking process, for every StartPage-EndPage 
API call we receive, we print an extra page that has the classification 
selected in a header and footer area on the extra page. Our custom print 
driver then later on knows to merge every second page into the preceding 
page thus giving us a printout with a classification on it.

When EndDoc is intercepted we then use the JOB_INFO_1 structure, TotalPages 
member, returned by GetJob to see how many pages in total have gone out. We 
then divide this by 2 because we know the driver is going to merge 2 into 1 
and then log the event.

The problem.

During recent tests, printing one page, I have found that the TotalPages 
member sometimes contains the value 0.  When it does the JOB_INFO 
PagesPrinted member then contains 2 (correctly).
Another time, the same test produces 2 in the TotalPages member and 0 in the 
PagesPrinted member.
I tried to workaround this by checking both members and using the one that 
didn't have the value 0.  This seemed to work for a while.
However the real problem comes when printing "n-up" documents.  Meaning 
telling Word, Excel to print more than 1 page on a page.  And this n-up can 
be done in 2 different ways from the apps mentioned.  firstly  by letting 
Word resize the pages to fit (Zoom: Pages per sheet), secondly by going into 
the printer properties and setting the pages per sheet in that.
These then produce varied figures in both the PagesPrinted and the 
TotalPages members.  This meaning that I cannot accurately tell how many 
pages have been printed.

Is there any way I can somehow make sure I get the exact number of pages 
printed back correctly?

Thanks and hope that description makes sense.  Please post if anything needs 
further explanation. or info

KeithM
date: Thu, 5 Jun 2008 13:39:47 +0100   author:   KeithM am

RE: Printing Problem. GetJob, JOB_INFO_1, TotalPages   
Hi KeithM,

Does this problem only occur in your big application? Or can it also be 
reproduced in a simple sample project? Can it be reproduced consistently? 

Looking at the nature of this issue, it would require intensive 
troubleshooting and debugging which would be done quickly and effectively 
with direct assistance from a Microsoft Support Professional through 
Microsoft Product Support Services. So I would recommend you to contact 
Microsoft CSS GDI team for a case support. They will assign one GDI 
specialized support engineer dedicate working with you. 

You can contact Microsoft Product Support directly to discuss additional 
support options you may have available, by contacting us at 1-(800)936-5800 
or by choosing one of the options listed at: 
http://www.microsoft.com/services/microsoftservices/srv_support.mspx

Thanks for your understanding. 

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
date: Fri, 06 Jun 2008 02:13:22 GMT   author:   (Jeffrey Tan[MSFT])

Re: Printing Problem. GetJob, JOB_INFO_1, TotalPages   
Ive not tried it in a stand alone application, will give that a go before I 
follow up your other suggestions.

Many Thanks

""Jeffrey Tan[MSFT]""  wrote in message 
news:8n%234tr3xIHA.3356@TK2MSFTNGHUB02.phx.gbl...
> Hi KeithM,
>
> Does this problem only occur in your big application? Or can it also be
> reproduced in a simple sample project? Can it be reproduced consistently?
>
> Looking at the nature of this issue, it would require intensive
> troubleshooting and debugging which would be done quickly and effectively
> with direct assistance from a Microsoft Support Professional through
> Microsoft Product Support Services. So I would recommend you to contact
> Microsoft CSS GDI team for a case support. They will assign one GDI
> specialized support engineer dedicate working with you.
>
> You can contact Microsoft Product Support directly to discuss additional
> support options you may have available, by contacting us at 
> 1-(800)936-5800
> or by choosing one of the options listed at:
> http://www.microsoft.com/services/microsoftservices/srv_support.mspx
>
> Thanks for your understanding.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Community Support
>
date: Fri, 6 Jun 2008 13:18:24 +0100   author:   KeithM am

Re: Printing Problem. GetJob, JOB_INFO_1, TotalPages   
Ok, if there is anything I can help, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
date: Mon, 09 Jun 2008 08:12:06 GMT   author:   (Jeffrey Tan[MSFT])

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us