Solved

Getting User printing Choices from windows

Posted on 2011-02-24
7
329 Views
Last Modified: 2012-05-11
I have a question which we stuck in.

In our port monitor I am getting user choices about print job from JOB_INFO_2 and DEVMODE structures.  
But I could not get or set some features of printer user interface. For example I could not get option called Nup (how many page per sheet).
Is there any way for solving this problem ?

When you print with Win32 Api How can you set up printing options ?
Some options are okay. I can set  them in DEVMODE or JOB_INFO_2.
But some Features like Nup I could not set them in win32.

Closest structure and function which are may be related with Nup  are PRINTPROCESSOR_CAPS_1 structure and GetPrintProcessorCapabilities functions.
But these are not using for conveying user choices.


Thanks in Advance
0
Comment
Question by:Tungaalper
  • 5
  • 2
7 Comments
 
LVL 14

Expert Comment

by:Don Thomson
ID: 34988651
If the users are members of a domain - the chances are the group policies are allowing them to print and delete print jobs that they create - but not actually manage the printer - which would cause serveral of the print options to be greyed out.

The easiest way to solve if this is the case is to just modify the group policies

Log in to a workstation as the Domain administrator and see if everyting work the way you want - Then if it does - it will be a permissions thing
0
 

Author Comment

by:Tungaalper
ID: 34989315
thanks for reply. but I believe there is misuderstanding.

basically i try to print with win 32 api. but i could not find structure that set up some feature of printer such as page per sheet.
0
 
LVL 14

Expert Comment

by:Don Thomson
ID: 34991221
Normally the Win 32 API will take ithe  basic options that are available from the installed print driver - If the Group policy has restricted some of those functions, and they are not available to the Installed print driver, they would not be available to the win 32 api either
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:Tungaalper
ID: 34991245
Thanks for reply. It is very good to know for future of my project.

Do you know any structure or method other than DEVMODE and JOB_INFO. These structure or methods has to be published by msdn and should allows us to print win 32. Because in the documention of WIN32 as far as i know three is no any struture that allow us printing with Nup(peg per shett)
0
 

Author Comment

by:Tungaalper
ID: 35067841
I found it but can not be used directly from win 32. I have to write User interface plug in and set this structure.

ATTRIBUTE_INFO_4 Structure

http://msdn.microsoft.com/en-us/library/ff545096(v=VS.85).aspx
0
 

Accepted Solution

by:
Tungaalper earned 0 total points
ID: 35068450
Thanks guys I found it MSDN but it is not for win32 I think.

ATTRIBUTE_INFO_4 Structure

The ATTRIBUTE_INFO_4 structure is used as a parameter for a printer interface DLL's DrvQueryJobAttributes function. All member values are function-supplied. This structure is similar to ATTRIBUTE_INFO_3, but it includes additional members to control N-up, duplex and booklet printing, and scaling.

http://msdn.microsoft.com/en-us/library/ff545096(v=vs.85).aspx
0
 

Author Closing Comment

by:Tungaalper
ID: 35120567
Find it MSDN
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

How to solve seemingly unsolvable printer issues. Users sometimes run into printing issues where all the normal steps do not seem to work. Well the steps below can show users how to take one extra step beyond the normal steps needed to remove old…
This seems to be a very common error related to the Samsung printer driver. First, this is the error we're talking about: Log: System Type: Error Event: 7000 Agent Time: 3:37:24 am 22-Apr-09 Event Time: 6:07:24 pm 21-Apr-09 UTC Source: Se…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now