'Why print Service stucks while sending ticket to print server?

Problem review:

  1. I'm trying to send a ticket to print server order through special service to print a label.
  2. Looks like it stucks due to some kind of error.
  3. Service uses basic xml file to send ticket to print server and merges it with pattern file, written in special print language.
  4. The XML-File disapears and it goes as a ticket but nothing has been printed.
  5. Previously it printed with another enterprise printer, but when we changed to another one and installed drivers it broken the print through service.
  6. Now new and old print prints only tickets with standart printserver in Windows with any kind of application, but not with "service".
  7. Therefore the error may be with service or with connection availability.

Help find, where should I look for solving this problem?

Error log:

TemplatePrinter.SendDataToPrinter    

Win32: -2147221500.Attribute content in the Option is invalid.    MS.Internal.Printing.Configuration.PTProvider.GetPrintCapabilities(MemoryStream printTicket)

in System.Printing.PrintTicketManager.GetPrintCapabilitiesAsXml(PrintTicket printTicket)
in System.Printing.PrintTicketManager.GetPrintCapabilities(PrintTicket printTicket)
in System.Printing.PrintQueue.GetPrintCapabilities(PrintTicket printTicket)
in Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.CaptureTicketSettings(PrintTicket ticket, String ticketXMLString)
in Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocument(String jobName, PrintTicket ticket)
in System.Windows.Xps.Serialization.NgcSerializationManager.StartDocument(Object o, Boolean documentPrintTicketRequired)
in System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(Object serializedObject)
in System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(Object serializedObject)
in System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
in System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator, PrintTicket printTicket)
in PrintElements.Classes.TemplatePrinter.SendDataToPrinter(PrintData data, ILogger logBase)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source