how do I set Paper Type while using PrinterDialog?

后端 未结 2 606
心在旅途
心在旅途 2021-02-06 19:08

I\'m trying to silently print a picture file and i need to print it on special paper type (\"Glossy Photo Paper\"), and on certain size (10cm on 15cm).

On normal windows

2条回答
  •  醉梦人生
    2021-02-06 19:12

    I'm not saying that it is impossible, but its not going to be pretty. Theoretically you can get the DEVMODE structure of the device( that structure will have extensions that are specific to the printer driver) set the correct values, and then write it back. There are some helper functions the the PrinterSettings object to do this. There is an example of doing that here

提交回复
热议问题