Using PrintDocument.DefaultPageSettings.Color

SyntaxEditor for Windows Forms Forum

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

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?

Thanks
Mike

Comments (1)

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

Hi Mike,

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

editor.PrintSettings.PrintDocument.Print();

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.1) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.