Problem with PrintToDotMatrixPrinter

Stimulsoft Reports.WPF discussion
Post Reply
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Problem with PrintToDotMatrixPrinter

Post by PJoyeux »

Hi,

when I use the preview-tab of objStiWpfDesignerControl, then call the DotMatrixPreview and then use the print button to print on a MatrixPrinter the report is printed correctly.

But when I user StiReport.PrintToDotMatrixPrinter(...) the output has many completely superfluous LF/CR in front and after the actual report. This leads to 10 or more pages that are fed through the printer after the report!!!

I have made HexDumps of the codes that are sent to the printer once printing directly and once printing via preview. I have then scanned those HexDumps (see PDF Files attached). The report is attached too (simple as can be, just "Test").

The printers are installed as "Generic" and I don't think this is a problem of the driver anyhow, since it works perfectly when printed from the preview.

This is the code I use to print the report directly.

Code: Select all

objReport.LoadFromString(sReportDefition);
objReport.Render();
objReport.PrintToDotMatrixPrinter(aPrinter, System.Text.Encoding.GetEncoding(1252), false, Stimulsoft.Report.Export.StiTxtBorderType.Simple, false, false, false, false, 100, 100, 1, objReport.RenderedPages.Count, true, "EpsonFX");
The only difference ist that I set some variables and register some BusinessObjects before printing directly which of course I can't do printing from the preview. But none of those variables and/or BusinessObjects are used within this Test-Report.

Any idea?

Cheers,
Pascal
Attachments
Test.mrt
(4.36 KiB) Downloaded 218 times
PrintFromPreview.pdf
HexDump when Printing from Preview (this is correct)
(11.28 KiB) Downloaded 269 times
DirectPrint.pdf
HexDump when Printing directly (this is NOT correct)
(114.53 KiB) Downloaded 252 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with PrintToDotMatrixPrinter

Post by HighAley »

Hello.

Sorry for the delay with answer. We need some additional time.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with PrintToDotMatrixPrinter

Post by HighAley »

Hello.

The zoomX and zoomY parameters should be 1. We will add this note to our documentation to avoid this problem again.

Thank you.
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Re: Problem with PrintToDotMatrixPrinter

Post by PJoyeux »

Oh boy... This really helped, I would never have figured this out by myself...

THANKS!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with PrintToDotMatrixPrinter

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply