// Assuming 'viewer' is an instance of the Viewer class
// To disable the print dialog while keeping the print progress dialog and printing on a separate thread, you can configure the PrintingSettings property as follows:
viewer.PrintingSettings = PrintingSettings.ShowPrintProgressDialog | PrintingSettings.UsePrintingThread;
// If you want to disable the print progress dialog but keep the print dialog and printing on a separate thread, use the following configuration:
viewer.PrintingSettings = PrintingSettings.ShowPrintDialog | PrintingSettings.UsePrintingThread;