我使用以下代码将视觉打印到打印机,页面范围从1到3;
代码段:
PrintDialog printDialog = new PrintDialog();
printDialog.PrintQueue = CurrentPrinter;
printDialog.PrintTicket = CurrentPrinter.UserPrintTicket;
printDialog.PageRangeSelection = PageRangeSelection.UserPages;
printDialog.UserPageRangeEnabled = true;
printDialog.PageRange = new PageRange(1, 3);
if((bool)printDialog.ShowDialog().GetValueOrDefault())
printDialog.PrintDocument(Paginator, "");
目前我需要打印多个页面范围,例如1-3,5-7。但是WPF打印对话框只支持一个页面范围,有没有办法呢?
提前致谢。