Regression in 2015.2 (DotMatrix output)

Stimulsoft Reports.NET discussion
Post Reply
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Regression in 2015.2 (DotMatrix output)

Post by Tobias »

Hello!

Since 2015.2 using escape codes with the dot matrix output doesn't work as before anymore.
The test below passes in 2015.1, but fails in 2015.2.

The text is "<#double>TEXT<#/double>" <#double> and <#/double> should translate to the appropriate ESC codes as defined in a custom StiEscapeCodesCollection.

Please note, that even 2015.1 is doing it wrong, because it adds a space after the <#/double> in the output.
In 2015.2 the <#/double> gets translated to EF-BB-BC-E2-80-8E in the output.

This only happens, if the text ends in an escape code. With a text like "<#double>TEXT<#/double>xxx" it works perfectly fine - no extra space, no gibberish.

Code: Select all

[Test]
public void Bug_with_reports_net_2015_02()
{
    var report = new StiReport();
    var stiPage = report.Pages[0];
    stiPage.Components.Add(new StiText(new RectangleD(0, 0, stiPage.Width, stiPage.PageHeight), "<#double>TEXT<#/double>"));

    var stiEscapeCodesCollection = new StiEscapeCodesCollection {{"double", "\x1d" + "!\x11"}, {"/double", "\x1d" + "!\x00"}};
    stiEscapeCodesCollection.Name = "EPSON";
    StiOptions.Export.Txt.EscapeCodesCollectionList.Add(stiEscapeCodesCollection);

    report.Render();
    var output = StiDotMatrixPrintProvider.GetReportForDotMatrixReport(report, Encoding.UTF8, false, StiTxtBorderType.Simple, false, false, false, true, 1f, 0.85f, StiPagesRange.All, true, "EPSON");
    Assert.That(output, Is.EqualTo("\x001d!\x0011TEXT\x001d!\x0000 \r\n"));
}
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Regression in 2015.2 (DotMatrix output)

Post by Alex K. »

Hello,

We need some additional time for check the issue. We will let you know when the solution is available.

Thank you.
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Re: Regression in 2015.2 (DotMatrix output)

Post by Tobias »

Hi!

Any news on this issue?

BR,

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

Re: Regression in 2015.2 (DotMatrix output)

Post by HighAley »

Hello, Tobia.

Sorry for the delay with answer.
We are working on the issue.
We will let you know when we get any result.

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

Re: Regression in 2015.2 (DotMatrix output)

Post by HighAley »

Hello.

We have made an improvement.
Please, check our next official build.
It will be available in a few days.

Thank you.
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Re: Regression in 2015.2 (DotMatrix output)

Post by Tobias »

Sorry for the late reply. I finally tested this and the bug is fixed in 2015.3! Thanks!

There's still an extra space added after the ESC code, if it is not followed by additional text.
"<#double>TEXT<#/double>" becomes "\x001d!\x0011TEXT\x001d!\x0000 \r\n" (extra space after \0000) while "<#double>TEXT<#/double>TEXT2" becomes "\x001d!\x0011TEXT\x001d!\x0000TEXT2\r\n" (no space after \0000).

That's not actually a problem for me, but I thunk it's wrong behaviour.

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

Re: Regression in 2015.2 (DotMatrix output)

Post by HighAley »

Hello.

We have made an improvement.
Please, check our next prerelease build on Friday.

Thank you.
Post Reply