CanGrow - Text height is wrong when exporting to PDF

Stimulsoft Reports.WEB discussion
Post Reply
diogo@forlogic.net
Posts: 10
Joined: Tue Jan 10, 2023 8:38 pm
Location: Brazil

CanGrow - Text height is wrong when exporting to PDF

Post 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 648 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 648 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.
Attachments
random_data_report.pdf
(26.18 KiB) Downloaded 71 times
Stimulsoft.Reports.RandomDataTest.zip
(176.03 KiB) Downloaded 74 times
Max Shamanov
Posts: 768
Joined: Tue Sep 07, 2021 10:11 am

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

Post by Max Shamanov »

Hello,

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

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

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

Post 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.
diogo@forlogic.net
Posts: 10
Joined: Tue Jan 10, 2023 8:38 pm
Location: Brazil

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

Post by diogo@forlogic.net »

Hello!

Thank you, Max!
It solved the problem.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply