Discussion:
[python-win32] win32print pDevMode change DriverData
Benjamin Kötting
2014-11-21 09:39:52 UTC
Permalink
_______________________________________________
python-win32 mailing list
python-***@python.org
https://mail.python.org/mailman/listinfo/python-win32
Tim Roberts
2014-11-24 06:21:15 UTC
Permalink
On Nov 21, 2014, at 1:39 AM, Benjamin Kötting <***@inetvalue.com<mailto:***@inetvalue.com>> wrote:

If I iterate over the pDevMode I see this options in DriverData binary string, first I try to make a binary replace in DriverData without success 2 more bytes are changed.

OVERCOATTYPE OPTYPE_LUSTER

If I will overwrite the whole DriverData with the data when the printer was set to matte using the windows dialog It works, so I have saved me the content and can load it into DriverData if needed.

But I think it is a very dirty way to do, even I doesn't know which special features will follow in the future.

Sadly, there really is no other way to do it. Windows tries its best to provide an abstraction for the devices at the bottom of things. With some classes of devices, the abstraction works well. With other classes, it doesn’t. Printing is one class of devices where it doesn’t work. Anything special features that weren’t anticipated in the abstraction aren’t available except through escapes and overrides, like what you are using.
--
Tim Roberts, ***@probo.com<mailto:***@probo.com>
Providenza & Boekelheide, Inc.
Loading...