我正在尝试使用以下代码通过 .NET 打印....
http://support.microsoft.com/kb/322091
OpenFileDialog ofd = new OpenFileDialog();
if( DialogResult.OK == ofd.ShowDialog(this) )
{
// Allow the user to select a printer.
PrintDialog pd = new PrintDialog();
pd.PrinterSettings = new PrinterSettings();
if( DialogResult.OK == pd.ShowDialog(this) )
{
// Print the file to the printer.
RawPrinterHelper.SendFileToPrinter(pd.PrinterSettings.PrinterName, ofd.FileName);
}
}
打印机对话框窗口打开,打印作业在队列中,但是,没有任何打印内容……我可以打印。