Text size and spacing increasing after upgrade

Stimulsoft Reports.WEB discussion
Ryan Robar
Posts: 22
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Text size and spacing increasing after upgrade

Post by Ryan Robar »

Hello,

I'm trying to upgrade Stimulsoft.Reports.Web.NetCore from 2020.5.1 to 2023.2.4. I'm comparing the rendered result of a simple report and I'm seeing some inconsistencies. The text size seems to be larger and the kerning (space between characters) seems to have been increased. This results in text that wraps differently, and in some cases it becomes so much larger that it no longer even fits in it's text box.

I've attached a simple example showing these issues. The title of the report is larger and more stretched out in the 2023.2.4 version. The text in the main text box doesn't fit anymore and gets cut off because the text is so much larger. You can also see that the text wraps differently in the newer version due to the size and spacing change. The first paragraph of the main text and the italicized text at the bottom both show this.

Is there a simple way to fix this? We would like to upgrade Stimulsoft to a newer version, but we use it to generate some legal documents. These documents frequently need to be filed with government regulators and these changes may be significant enough that our clients would need to re-file their documents. We'd like to avoid this if possible.

Thank you
Attachments
Report-2023.2.4.pdf
(15.99 KiB) Downloaded 97 times
Report-2020.5.1.pdf
(17.85 KiB) Downloaded 98 times
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Text size and spacing increasing after upgrade

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Ryan Robar
Posts: 22
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Re: Text size and spacing increasing after upgrade

Post by Ryan Robar »

Hello,

Is there any update you can provide on this issue? It's been almost 2 weeks.
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Text size and spacing increasing after upgrade

Post by Max Shamanov »

Hello,

Please try to load the fonts you use into the StiFontCollection.
You can use the following code:

Code: Select all

Stimulsoft.Base.StiFontCollection.AddFontFile(FontFile)
Also you can try to use the following code:

Code: Select all

Stimulsoft.Drawing.Graphics.GraphicsEngine = Stimulsoft.Drawing.GraphicsEngine.Gdi;
If the issue still persist please send us a sample report that reproduces the issue.

Thank you.
Ryan Robar
Posts: 22
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Re: Text size and spacing increasing after upgrade

Post by Ryan Robar »

Hello,

Thank you for the reply.

I tried loading the font, but it didn't seem to make any difference. I then tried changing the graphics engine to GDI, and that seemed to fix the issue perfectly. Do you know why this is happening? Is this an issue with ImageSharp where it's rendering text too large?
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Text size and spacing increasing after upgrade

Post by Max Shamanov »

Hello,

The problem may be related to the SixLabor library because it calculates the font differently.
Let us know if you need our help.

Thank you.
Ryan Robar
Posts: 22
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Re: Text size and spacing increasing after upgrade

Post by Ryan Robar »

Are you planning on reaching out to SixLabors to see why their code is rendering things differently? At the very least they may be able to help you scale and space the font so that it matches GDI.

I'm assuming your GDI engine uses Microsoft's GDI+ interface and is therefore Windows only. We can use GDI for now, but we would like to make our product cross-platform eventually so we'll need to switch to ImageSharp at that point.

Can you please look into making your rendering engines as consistent as possible?

Thank you.
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Text size and spacing increasing after upgrade

Post by Max Shamanov »

Hello,

Yes, we are aware of the problem, and we are trying to improve performance on our own.

Thank you.
Ryan Robar
Posts: 22
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Re: Text size and spacing increasing after upgrade

Post by Ryan Robar »

Hello,

I just re-ran this test report in your new 2023.2.8 release because the patch had the following line in the bug fix section:
In .NET Core components, a bug related to the calculation of text height when exporting a report to PDF has been fixed.
After testing the report, I can see some improvement. The italicized text in the footer now wraps the same way it does in the designer. The main body of the text still doesn't in the first paragraph, and the text is still so much taller than it should be that it doesn't fit in the text box and gets cut off.

I've attached the sample I produced for you to review. I've also attached the mrt so you can compare in the designer.

Thanks,

Ryan
Attachments
RenderTest-2023.2.8.mrt
(15.04 KiB) Downloaded 71 times
RenderTest-2023.2.8.pdf
(15.99 KiB) Downloaded 70 times
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

Re: Text size and spacing increasing after upgrade

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#11954
Post Reply