Printer Preferences Dialog

  • Thread starter Thread starter Sadik Eser
  • Start date Start date
S

Sadik Eser

Hi,

I want to change the printer setting before printing,
i.e. using grayscale printing, instead of colorfull printing.
However, I should do it programatically, the users of my program would not
change this property.

Thanks..
 
Sadık Eser said:
Hi,

I want to change the printer setting before printing,
i.e. using grayscale printing, instead of colorfull printing.
However, I should do it programatically, the users of my program would not
change this property.

Thanks..

Hi,

You can either use your own PrinterSettings when specifying the
PrintDocument or override in the PrintPage event.

PrintDocument doc = new PrintDocument();
PrinterSettings settings = new PrinterSettings();
settings.DefaultPageSettings.Color = false;
doc.PrinterSettings = settings;
doc.PrintPage += new PrintPageEventHandler(doc_PrintPage);
doc.Print();

.... or ...

void doc_PrintPage(object sender, PrintPageEventArgs e)
{
e.PageSettings.Color = false;
e.Graphics.DrawString("Hello world", Font, Brushes.Magenta, new
Point(50, 50));
}

Either way should print "Hello world" in gray.
 

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

Back
Top