ServerTextControl的问题又出现了, 这次是打印tx文件, 日志里面的出错信息由点不一样
The operation could not be performed. An unexpected error has occurred. (03-1008)
at TXTextControl.LoadSettings.?(String , StreamType , TextControlCore , ? )
at TXTextControl.ServerTextControl.Load(String path, StreamType streamType)
at Maroland.TXControl.TXControlDocument.Print(String reportPath, PrintDocument printDocument)
一下是相关代码
- try
- {
- using (TXTextControl.ServerTextControl serverTextControl = new TXTextControl.ServerTextControl())
- {
- serverTextControl.Create();
- serverTextControl.Load(tempFile, TXTextControl.StreamType.InternalUnicodeFormat);
- serverTextControl.Selection.Start = 0;
- serverTextControl.Selection.Length = serverTextControl.Text.Length;
- serverTextControl.Selection.Underline = TXTextControl.FontUnderlineStyle.None;
- serverTextControl.Selection.ForeColor = System.Drawing.Color.Black;
- serverTextControl.Print(printDocument);
- break;
- }
- }
- catch (Exception ex)
- {
- LogAdapter.LogError("Print" + ex.Message);
- LogAdapter.LogError("Print" + ex.StackTrace);
- }
复制代码
在windows xp系统下做打印操作, 但是所有的tx文件全都打印不了, 应该是和tx文件本身没关系了.究竟要怎么解决这类问题啊, servertextcontrol出错的问题已经在好多客户的好多场景下都遇到过了, 这个体验非常不好.
我拿了一个tx文件回来, 在附件里面.
|
|