Reputation: 1144
I'm working on a C# desktop application where I need to change some printer settings and print some pictures. In my program I already can set the Paper Size, Printer Name, etc... If I go into the Advanced Options of the printer preferences, there is a section called "Printer Features". I cannot figure out how to access the parameters in the printer settings. For example there is "Border", "Overcoat Finish", "2inch cut", etc.. Specifically what I'm interested in is "2inch cut".
How can I get at these properties in run time?
UPDATE I changed the picture and question a little bit to be more specific.
Upvotes: 4
Views: 3257
Reputation: 1144
Okay, so I came across a solution that works very well for me, hopefully this will help others.
After a bit of research, I found out that my printer just isn't set up to allow those features to be accessed through the driver. So what I did was create a second profile in the printers and devices in windows that connects to the same printer on the same port with the same drivers. Then with my program I just select the different printer profile based on what my needs are. Works like a charm.
Thanks to everyone who contributed.
Upvotes: 4
Reputation: 1314
You can set the printer quality using dmPrintQuality member of the DEVMODE structure. Other printer features may not be applicable for all printers. Some printer drivers may expose properties which are quite different to other print drivers. This is normally done using the dmDriverExtra extra member of the above structure. As MSDN says dmDriverExtra is private printer data:
Contains the number of bytes of private driver-data that follow this structure. If a device driver does not use device-specific information, set this member to zero.
Upvotes: 0