Changing printer settings programmatically...

E

ExitusLSU

Is there a way to change the DEFAULT printer settings for an installed
printer? I want it to change the printer settings for a specified
printer at the whole OS/Windows level, not just for the application.
Specifically, I need to change the default papersize for the printer
for about 150 remote users.

I've tried changing the paper size for the printer using the
PrintDocument class, but that doesn't seem to change the default paper
size at the OS/Windows level. It appears to only change it for that
specific process/application.

Here is the code I used:

PrintDocument pd = new PrintDocument();

foreach (PaperSize paperSz in pd.PrinterSettings.PaperSize)
if (paperSz.PaperName.StartWith("A4"))
pd.DefaultPageSettings.PaperSize = paperSz;

I've verified that is actually changes the page size for the printer
for the current process, but when I look at Printing Preferences for
the printer at the OS level, it set to a different page size. Is there
a way to change this property using C#/VB.Net?

Thanks,
ExitusLSU
 
D

Dale Lundgren

Did you ever resolve this issue? I also have the same need.

Thank you,

Dale Lundgren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top