问题描述
大家好,
在WPF中尝试使用PrintDialog类进行打印时,我得到了一个例外,这基本上是在调用PrintDocument,没什么特别的,它可以在3/5的打印机上使用,经测试,它似乎仅在某些打印机上发生,这是错误:
PrintTicket提供程序无法检索PrintCapabilities. Win32错误:在图像文件中找不到指定的资源名称.
在MS.Internal.Printing.Configuration.PTProvider.GetPrintCapabilities(MemoryStream printTicket)
在System.Printing.PrintTicketManager.GetPrintCapabilitiesAsXml(PrintTicket printTicket)
在System.Printing.PrintTicketManager处. GetPrintCapabilities(PrintTicket printTicket)
在System.Printing.PrintQueue.GetPrintCapabilities(PrintTicket printTicket)
在Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.CaptureTicketSettings(PrintTicket票证)
在Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocument(String jobName,PrintTicket ticket)
在System.Windows.Xps.Serialization.NgcSerializationManager.StartDocument(Object o,布尔documentPrintTicketReq uired)
在System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(Object serializedObject)
在System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(Object serializedObject)
在System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject,Boolean isSync)
在System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator)
System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator,字符串描述)
在WpfApplication1.Window1.Button_Click (对象发送者,RoutedEventArgs e)
这是一个紧迫的问题,也是一个很大的问题障碍,我真的希望有此问题的解决方法,而不是等待下一个版本来解决此问题.
请询问我是否可以提供任何附加内容有关进一步调试的国家信息.
出现错误的打印机型号是:
RICOH Aficio MP C3500 PS.
谢谢.
谢谢.
Winston
Hi everyone,
I'm getting an exceptin when trying to print using the PrintDialog class in WPF, this is just basically calling PrintDocument, nothing fancy, it works on 3/5 printers I've tested with, it appears it happens only on some printers, this is the error:
PrintTicket provider failed to retrieve PrintCapabilities. Win32 error: The specified resource name cannot be found in the image file.
at MS.Internal.Printing.Configuration.PTProvider.GetPrintCapabilities(MemoryStream printTicket)
at System.Printing.PrintTicketManager.GetPrintCapabilitiesAsXml(PrintTicket printTicket)
at System.Printing.PrintTicketManager.GetPrintCapabilities(PrintTicket printTicket)
at System.Printing.PrintQueue.GetPrintCapabilities(PrintTicket printTicket)
at Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.CaptureTicketSettings(PrintTicket ticket)
at Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocument(String jobName, PrintTicket ticket)
at System.Windows.Xps.Serialization.NgcSerializationManager.StartDocument(Object o, Boolean documentPrintTicketRequired)
at System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(Object serializedObject)
at System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(Object serializedObject)
at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
at System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator)
at System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator, String description)
at WpfApplication1.Window1.Button_Click(Object sender, RoutedEventArgs e)
This is a pressing issue and a big road block, I really hope there's a fix to this, rather than waiting for the next release to fix this.
Please ask if I can give any additional information for further debugging.
The model of the printer that the error is coming up on is:
RICOH Aficio MP C3500 PS.
Thanks.
Thanks.
Winston
推荐答案
更新打印机驱动程序通常也可以解决此问题.
这篇关于WPF打印错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!