Page 1 of 1

CanGrow - Text height is wrong when exporting to PDF

Posted: Tue Jan 10, 2023 9:06 pm
by diogo@forlogic.net
Hello,

I'm using .Net 6 and the Nuget package Stimulsoft.Reports.Web.NetCore (version 2023.1.3) to render my reports and export to PDF.
The image below shows what is happening, even with textbox CanGrow property set to true.
stimulsoft-wrong-text-height.png
stimulsoft-wrong-text-height.png (84.71 KiB) Viewed 1590 times
If I use the Preview with the Windows Desktop Designer, it shows texts with right height.
The problem only exists when exporting to PDF.
This is the code I'm using to export.
stimulsoft-export-pdf-code.png
stimulsoft-export-pdf-code.png (40.14 KiB) Viewed 1590 times
There is a Visual Studio project attached, with my code, a sample report and random data to show the problem.
When running the project, we can just open the url https://localhost:7231/Reports/GetTestReport and refresh some times to see the height problem.
The attached PDF is what i got with this code.

Can you help me?
Thank you.

Re: CanGrow - Text height is wrong when exporting to PDF

Posted: Wed Jan 11, 2023 6:17 am
by Max Shamanov
Hello,

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

Thank you.

Re: CanGrow - Text height is wrong when exporting to PDF

Posted: Wed Jan 11, 2023 9:02 am
by Max Shamanov
Hello,

Please use the following code before creating a new report:

Code: Select all

Stimulsoft.Drawing.Graphics.GraphicsEngine = Stimulsoft.Drawing.GraphicsEngine.Gdi;
Thank you.

Re: CanGrow - Text height is wrong when exporting to PDF

Posted: Fri Jan 13, 2023 6:10 pm
by diogo@forlogic.net
Hello!

Thank you, Max!
It solved the problem.

Re: CanGrow - Text height is wrong when exporting to PDF

Posted: Fri Jan 13, 2023 10:53 pm
by Lech Kulikowski
Hello,

You are welcome.