1

Background

I'm trying to write a program using the net5.0-windows framework (C#) that allows me to print my documents in different media types.

I can set almost everything via the System.Printing printDocument class but can't seem to change the media type to something else like in the image below

printer preferences

Question

How can I force the printDocument to set the media type to something else on the list? or possibly a custom string or MediaType?

Update 2

Can this be done using DEVMODE?

Update 1

It seems that the window generic driver I used doesn't support this option, if you have any information on how to interact with vendor window drivers. I would appreciate it.

T.script
  • 297
  • 1
  • 3
  • 13
  • I depends on the driver that you are using. Not all drivers will support all the parameters. You need to check the documentation of the driver to get the proper format. – jdweng Jan 25 '22 at 14:02
  • @jdweng I understand this, but where can I set the media type? for now I'm not worried about if the printer can support the type just that I can set it. – T.script Jan 25 '22 at 14:18
  • That makes no sense. There are two different types of print drivers PCL or PS (or EPS enhanced). Then there are microsoft generic print drivers and vendor print drivers. Not all drivers will support the media type and not all printers support media types. So how can you set a parameter that isn't supported by the driver? – jdweng Jan 25 '22 at 14:57
  • I see I didn't realize there are different types of windows drivers, do you have any information using the Microsoft generic print drivers to set the media type? I installed the printer using the generic windows driver, and was using System.printing printDocument. – T.script Jan 25 '22 at 15:18
  • It is better to use the manufacturers driver that works properly with all the printer features than the Microsoft generic driver. – jdweng Jan 25 '22 at 15:24
  • Okay I'll look into this more, thank you – T.script Jan 25 '22 at 15:26

0 Answers0