Using PrintDocument.DefaultPageSettings.Color

SyntaxEditor for Windows Forms Forum

Posted 7 years ago by Mike 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 7 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 (v2020.1 build 0402) was released 27 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.