0

Hi im currently looking for the solution of the problem im currently using devexpress document Viewer Tool and i notice that when i tried to export the document there are too many formats which is not actually needed so i intent to remove it is there a way to do it? i've tried this code base on my research on the internet

ExportOptions options = documentViewer1.PrintingSystem.ExportOptions;

            options.SetOptionsVisibility(new ExportOptionKind[] { ExportOptionKind.RtfExportMode,ExportOptionKind.RtfExportWatermarks,
                ExportOptionKind.RtfPageRange,ExportOptionKind.PdfDocumentSubject, ExportOptionKind.PdfDocumentTitle}, false);   

but its seems that its not working i want to remove this part please See image enter image description here

did i do something wrong?? i just followed the instruction on the internet but its not really working on my side i want to remove it on run time. THanks

bRaNdOn
  • 1,060
  • 4
  • 17
  • 37

1 Answers1

1

You must use PrintingSystemBase.SetCommandVisibility method instead of ExportOptions.SetOptionsVisibility method:

documentViewer1.PrintingSystem.SetCommandVisibility(new PrintingSystemCommand[] { PrintingSystemCommand.ExportRtf }, CommandVisibility.None);
nempoBu4
  • 6,521
  • 8
  • 35
  • 40