Q:

How to remove a certain print to file feature of Devexpress document Viewer

hi im just wondering when i tried to print the report on devexpress document viewer i found a weird feature that i donw really need in terms of functionality and i want to remove it is there a way to remove it??.. this is the feature that i want to remove kindly see image for reference

Is there a way to remove it? i spend hours looking for solution for this but i cant find it i just thought that you guys could possibly help me thank in advance 

A:

You can replace the DefaultPrintDialogRunner, returned by the PrintDialogRunner.Instance property, with a customized version of the SystemPrintDialogRunner or the DefaultPrintDialogRunner  class.
Here is the way to replace the default PrintDialogRunner:
using DevExpress.XtraEditors.Preview;
// ...
static void Main(string[] args) {
    PrintDialogRunner.Instance = new SystemPrintDialogRunner(); // !!!
    // ...
}

The code above will result that the PrintTool.PrintDialog method will invoke the standard system Print dialog:

Then you should create your own version of PrintDialogRunner that invokes the PrintDialogRunner.Run method with the the specific flags and use this class in the approach mentioned above:
class CustomPrintDialogRunner : DefaultPrintDialogRunner {
    public override DialogResult Run(PrintDocument document, UserLookAndFeel lookAndFeel, 
        IWin32Window owner, PrintDialogAllowFlags flags) {
        // Disable the print-to-file option.
        flags &= ~PrintDialogAllowFlags.AllowPrintToFile;
        return base.Run(document, lookAndFeel, owner, flags);
    }
}
//...
PrintDialogRunner.Instance = new CustomPrintDialogRunner ();

