WPF 打印机打印PDF功能
作者:互联网
其实很简单,直接把界面的控件传入直接打印控件的内容:
private void Button_Click(object sender, RoutedEventArgs e) { PrintDialog dialog = new PrintDialog(); if (dialog.ShowDialog() == true) { dialog.PrintVisual(控件名, "Print Test"); } }
标签:控件,打印机,打印,private,dialog,Test,PDF,WPF,PrintDialog 来源: https://www.cnblogs.com/mqxs/p/16410392.html