Using PrintDocument.DefaultPageSettings.Color

SyntaxEditor for Windows Forms Forum

Posted 10 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Version: 13.1.0312

I get the PrintDocument object from your PrintSettings so that I can set up the page how I want it.

If I try to set the Color option it only seems to work if the user decides to print to the default printer. If they choose a different printer that option is reset to its default for that new printer.

Since I can only set the PrintDocument options BEFORE calling your Print() method [which then displays the dialog that allows the user to select their printer] how do I handle this?

Do I have to display the printer dialog myself, and then set the options before calling Print() with ShowDialog=False?


Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Mike,

Yes you could do it that way:  show your own dialog and update the PrintDocument.  Then call:


That's effectively the line that our SyntaxEditor.Print() method does if you pass ShowDialog=false.

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.