Discussion:
Setting print quality
(too old to reply)
unknown
2004-07-22 08:39:44 UTC
Permalink
Hi,

i experienced the following behaviour:

Is used SetPrinter to change a printers "Print Quality" setting to
DMRES_something.
After the successful call, i used GetPrinter to re-read the settings but now
the dwPrintQuality member of the DEVMODE structure doesn't contain
DMRES_something, but some resolution in DPI!
Another quite strange behaviour is, that I have a printer driver which maps
two of the four DMRES_* values to the same DPI values.

My problem is, that I want to display the current settings using radio
buttons which represent the DMRES_* values, but it's difficult with DPI
values, because I don't know which values the printer supports.

Has anybody an idea how i can solve this problem and if it's possible to map
DPI values to DMRES_* values?

Thank you very much!
Max
Chris Hill
2004-07-23 03:24:07 UTC
Permalink
On Thu, 22 Jul 2004 10:39:44 +0200, "Markus Eßmayr"
Post by unknown
Hi,
Is used SetPrinter to change a printers "Print Quality" setting to
DMRES_something.
After the successful call, i used GetPrinter to re-read the settings but now
the dwPrintQuality member of the DEVMODE structure doesn't contain
DMRES_something, but some resolution in DPI!
Another quite strange behaviour is, that I have a printer driver which maps
two of the four DMRES_* values to the same DPI values.
My problem is, that I want to display the current settings using radio
buttons which represent the DMRES_* values, but it's difficult with DPI
values, because I don't know which values the printer supports.
Has anybody an idea how i can solve this problem and if it's possible to map
DPI values to DMRES_* values?
Thank you very much!
Max
It doesn't sound strange to me that two of the predefined values
happen to map onto the same DPI.

You can use DeviceCapabilities with DC_ENUMRESOLUTIONS to get the
resolutions that the printer supports.

Chris
unknown
2004-07-26 12:23:21 UTC
Permalink
Heres some additional information:

I'd like to change the default document settings for a printer.
Currently I use the following method:

1. Open Printer
2. GetPrinter (Level 2)
3. If no DEVMODE is returned, I use DocumentProperties to get it.
4. Modify the dmPrintQuality member.
5. Use SetPrinter (Level 2) to set the new settings.

I read in the MSDN that DocumentProperties MUST be called to verify the
DEVMODE-Settings, but I don't know exactly whats meant by this.

Has anyone some hints for me?

THANKS VERY MUCH!
Max
Post by unknown
Hi,
Is used SetPrinter to change a printers "Print Quality" setting to
DMRES_something.
After the successful call, i used GetPrinter to re-read the settings but now
the dwPrintQuality member of the DEVMODE structure doesn't contain
DMRES_something, but some resolution in DPI!
Another quite strange behaviour is, that I have a printer driver which maps
two of the four DMRES_* values to the same DPI values.
My problem is, that I want to display the current settings using radio
buttons which represent the DMRES_* values, but it's difficult with DPI
values, because I don't know which values the printer supports.
Has anybody an idea how i can solve this problem and if it's possible to map
DPI values to DMRES_* values?
Thank you very much!
Max
vipin
2004-07-28 09:38:12 UTC
Permalink
By calling DocumentProperties(...), you ask the device driver to verify the
settings and make them proper. For e.g:- if you specify dmduplex to be
duplexing and pass to a printer driver whose printer capabilities says the
printer can't support duplexing , the device driver will turn it back to
non-duplex the dmduplex member of devmode and return the devmode back.

Do you understand?

thanks
vipin
Post by unknown
I'd like to change the default document settings for a printer.
1. Open Printer
2. GetPrinter (Level 2)
3. If no DEVMODE is returned, I use DocumentProperties to get it.
4. Modify the dmPrintQuality member.
5. Use SetPrinter (Level 2) to set the new settings.
I read in the MSDN that DocumentProperties MUST be called to verify the
DEVMODE-Settings, but I don't know exactly whats meant by this.
Has anyone some hints for me?
THANKS VERY MUCH!
Max
Post by unknown
Hi,
Is used SetPrinter to change a printers "Print Quality" setting to
DMRES_something.
After the successful call, i used GetPrinter to re-read the settings but
now
Post by unknown
the dwPrintQuality member of the DEVMODE structure doesn't contain
DMRES_something, but some resolution in DPI!
Another quite strange behaviour is, that I have a printer driver which
maps
Post by unknown
two of the four DMRES_* values to the same DPI values.
My problem is, that I want to display the current settings using radio
buttons which represent the DMRES_* values, but it's difficult with DPI
values, because I don't know which values the printer supports.
Has anybody an idea how i can solve this problem and if it's possible to
map
Post by unknown
DPI values to DMRES_* values?
Thank you very much!
Max
Loading...