C# 在打印文档中发送数百万个数据点时,打印机无法打印
目前,我正在尝试打印一个使用C#/.NET和GDI+创建的数据图,它有数百万个数据点。当文档转到打印机时,打印机表示已成功打印文档,并打印了0页。这份文件永远不会被打印出来。以下是我的一些代码:C# 在打印文档中发送数百万个数据点时,打印机无法打印,c#,gdi+,printdocument,C#,Gdi+,Printdocument,目前,我正在尝试打印一个使用C#/.NET和GDI+创建的数据图,它有数百万个数据点。当文档转到打印机时,打印机表示已成功打印文档,并打印了0页。这份文件永远不会被打印出来。以下是我的一些代码: private void btnPrint_Click(object sender, EventArgs e) { if (_config == null) { lblStatus.Text = "Error, config is
private void btnPrint_Click(object sender, EventArgs e)
{
if (_config == null)
{
lblStatus.Text = "Error, config is null";
return;
}
_pd = new PrintDocument();
//PaperSize paperSize = new PaperSize("CustomTest", 1000, 100);
//_pd.DefaultPageSettings.PaperSize = paperSize;
_pd.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0);
// Add event handler
_pd.PrintPage += new PrintPageEventHandler(PrintPage);
_pd.BeginPrint += new PrintEventHandler(BeginPrinting);
// Construct print dialog
PrintDialog pDialog = new PrintDialog();
pDialog.AllowSomePages = true;
pDialog.ShowHelp = true;
pDialog.Document = _pd;
// Ask the user for input
DialogResult result = pDialog.ShowDialog();
// Print if user desires
if (result == DialogResult.OK)
{
_pd.Print();
}
}
有人有什么建议吗?TIA.结果是公司的后台打印程序在碍事。解决方案是绕过公司打印系统,通过按IP地址添加打印机,直接打印到打印机。是PCL6驱动程序坏了