请问一个c#中的打印问题
想请问一个c#中的打印问题,下面是我写的一段打印一个文件的代码,你看看这样写支持网络打印么,我用网络上的打印机,结果打出来的是空白页面,怎么解决?
private void button1_Click(object sender, System.EventArgs e)
{
printDialog1=new PrintDialog();
printDialog1.AllowPrintToFile =false;
PrintDocument docPrn = new PrintDocument();
docPrn.DocumentName="t1.txt";
printDialog1.Document=docPrn;
if(printDialog1.ShowDialog()==DialogResult.OK)
{
try
{
docPrn.Print();
}
catch
{
MessageBox.Show ("Error While Printing", "Print Error");
}
}
}