Printersetup properties - revisited
In the past I asked about a "destination" property that doesn't seem
to exist in the printer setup properties. All responses mentioned
the "BinName" property but that one is strictly used for "input"
items that can be used for a particular printer such as
"Letterhead", "Cardstock", etc. We have a situation where *output*
produced by the printer must be directed to a bin other than the
default (top) bin. Of course, the problem isn't that the user can't
select the desired bin in the printer setup dialogue, it's that I
can't figure out how to get the selected bin name that the user
selected so that I can store it for use later.
Any suggestions/ideas/how to's?
Regards,
Al
to exist in the printer setup properties. All responses mentioned
the "BinName" property but that one is strictly used for "input"
items that can be used for a particular printer such as
"Letterhead", "Cardstock", etc. We have a situation where *output*
produced by the printer must be directed to a bin other than the
default (top) bin. Of course, the problem isn't that the user can't
select the desired bin in the printer setup dialogue, it's that I
can't figure out how to get the selected bin name that the user
selected so that I can store it for use later.
Any suggestions/ideas/how to's?
Regards,
Al
This discussion has been closed.
Comments
driver. All parameters of a printer device are stored by Windows in a
DEVMODE structure (see the Win32 API SDK for more information). The DEVMODE
structure stores generic information for the device which is then followed
by extra information pertaining to the specific driver. The size of the
extra information is specified by the dmDriverExtra public member of the
DEVMODE structure and starts at the very end of the structure itself. That
is, the extra parameters start at sizeof(DEVMODE) and go through
sizeof(DEVMODE) + devmode.dmDriverExtra. The problem, of course, is knowing
what data to pull out of the customer parameters. To get this information
you have to refer to the documentation for your particular printer driver.
Please take a look at the the sample demos below for dealing with the
DEVMODE structure.
http://www.digital-metaphors.com/tips/SavePrinterDevMode.zip
http://www.digital-metaphors.com/tips/PrinterDevModeMediaType.zip
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com