Матричный режим
Добавлено: 19 апр 2007, 18:33
На данный момент наши возможности по управлению печатью на матричные принтеры сильно ограничены. Мы проверим проблему с кодировкой.
Спасибо.
Спасибо.
Создание отчетов и дашбордов в ASP.NET, ASP.NET MVC, .NET Core, Blazor, Angular, PHP, Python, WPF, JavaScript, и Java приложениях и сервисах.
https://forum.stimulsoft.ru/
Код: Выделить всё
string reportStr = report.GetReportForDotMatrixReport(encoding,
drawBorder, borderType, killSpaceLines, killSpaceGraphLines,
putFeedPageCode, cutLongLines, zoomX, zoomY,
new StiPagesRange(StiRangeType.Pages, string.Format("{0}-{1}",
printDocument.PrinterSettings.FromPage, printDocument.PrinterSettings.ToPage), 0));
StiRawPrinterHelper.SendStringToPrinter(printDocument.PrinterSettings.PrinterName, report.ReportAlias, reportStr, encoding);
Код: Выделить всё
public void ExportTxt(StiReport report, Stream stream, StiTxtExportSettings settings)
{
...
StreamWriter sw = new StreamWriter(stream, encoding);
...
Код: Выделить всё
public static void SendStringToPrinter(string printerName, string docName, string text, Encoding encoding)
{
..
byte[] data = encoding.GetBytes(text);
Код: Выделить всё
at System.IO.StreamWriter..ctor(Stream stream, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(Stream stream, Encoding encoding)
at Stimulsoft.Report.Export.StiTxtExportService.ExportTxt(StiReport report, Stream stream, StiTxtExportSettings settings)
at Stimulsoft.Report.Export.StiTxtExportService.ExportTxt(StiReport report, Stream stream, Encoding encoding, Boolean drawBorder, StiTxtBorderType borderType, Boolean killSpaceLines, Boolean killSpaceGraphLines, Boolean putFeedPageCode, Boolean cutLongLines, Single zoomX, Single zoomY, StiPagesRange pageRange)
at Stimulsoft.Report.StiReport.GetReportForDotMatrixReport(Encoding encoding, Boolean drawBorder, StiTxtBorderType borderType, Boolean killSpaceLines, Boolean killSpaceGraphLines, Boolean putFeedPageCode, Boolean cutLongLines, Single zoomX, Single zoomY, StiPagesRange pageRange)
at Stimulsoft.Report.Print.StiDotMatrixPrintProvider.Print(StiReport report, String printerName, Encoding encoding, Boolean drawBorder, StiTxtBorderType borderType, Boolean killSpaceLines, Boolean killSpaceGraphLines, Boolean putFeedPageCode, Boolean cutLongLines, Single zoomX, Single zoomY, Int32 fromPage, Int32 toPage)
at Stimulsoft.Report.StiReport.PrintToDotMatrixPrinter(String printerName, Encoding encoding, Boolean drawBorder, StiTxtBorderType borderType, Boolean killSpaceLines, Boolean killSpaceGraphLines, Boolean putFeedPageCode, Boolean cutLongLines, Single zoomX, Single zoomY, Int32 fromPage, Int32 toPage)
at Stimulsoft.Report.Render.StiPreviewControl.OnClickPrintButton(Object sender)
at Stimulsoft.Report.Render.StiPreviewControl.InvokeClickPrintButton()
at Stimulsoft.Report.Render.StiPreviewControl.tbPrint_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at Stimulsoft.Controls.StiToolButton.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at Stimulsoft.Controls.StiToolButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
...
Код: Выделить всё
StiOptions.Viewer.DotMatrix.UseEscapeCodes = true;