I have several custom paper sizes defined on the printer (the printer is installed by default). I need to choose one of these formats as standard.
A software (C #) solution would be ideal, but on the command line would also be good.
Now I can get a list of paper sizes (name / sizes) defined on the printer, and I can find out which one is the default.
To choose a different default format, the only solution I still have is to change the dmPaperSize field in the devMode structure; BUT I cannot find out the correct value corresponding to the desired paper size. Therefore, I set dmPaperSize to 0 and increase it until the correct format appears on the printer. This takes a lot of time on some printers.
Is there any other way to select (by name) the default folder format on the default printer?
source share