Text shifts and space grows on rendering in docker container

1 Answer 23 Views
.NET Core
said
Top achievements
Rank 1
said asked on 18 Apr 2025, 04:10 PM

Hey forum members, 

My company recently decided to move the apps from IIS to Kubernetes. We had some issues with fonts but we solved. Telerik can render pdf succesfully but we see some shifts on texts and spaces in words get bigger. It renders on IIS on windows server fine, but in docker container, it seems weird a bit. We could not the reason. 

I m attaching the screenshots.
Note: all the data in the attached pictures are test data. They are not valid.

What is your suggestions about the cause? 

Thanks

Said

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 22 Apr 2025, 10:43 AM

Hi Said,

Can you elaborate on your environment?

You have specified the Telerik Report Server product in the Ticket Info, and its .NET Framework version can run only on IIS. The .NET 8 version is still in preview and may run on Docker with Linux and on Windows IIS.

In the red Trial message from the Standalone Report Designer screenshot, I see Telerik Reporting version 19. There is no indication of the designer being connected to a Report Server. Do you use Telerik Reporting for building your application that exports PDF documents? If so, do you use the Skia graphics engine (see processing Element) on Linux when deploying on Kubernetes? What is the exact Reporting version on your application? We are aware of issues with Skia, and some of them have already been addressed in our latest releases.

Which fonts does your report use? Did you ensure the correct fonts are deployed on your production environment?

Can you send a runnable report we may use to reproduce the issue locally and investigate?

Regards,
Todor
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

said
Top achievements
Rank 1
commented on 24 Apr 2025, 11:44 AM

Hi Todor, thank you for taking your time to read and answer my question. 

The app is net7.0 ASP.NET Core Web API

In this api we use Telerik.Reporting Version=15.2.21.1125, and Telerik.Reporting.WebServiceDataSource Version=15.2.21.1125
To be honest, I dont make changes on designs, I m working on dockerizing this api and deploying to kubernetes. 
I downloaded the designer from Telerik's web site to see the content of design.
I just asked to a coworker about designer version, she said the Telerik Report Designer she uses is version 15.2.21.1125, I attached the screenshot of the designer on her computer now.

Our workflow is generally this: 
-Product team makes requests for change
-One of the devs who are responsible for design changes makes change, puts into repository
-If no code is changed; then manually puts the changed trdp file into app folder on IIS server
-If code is changed; then publish the api, and put the artifact into app folder on IIS server

Right now we are trying to change this behaivour. After a change merged into repository, a pipeline starts and creates docker image, and then deploy to kubernetes pod with no manual process involved

I m sorry, I dont know what Skia is. Neither does my coworker

The base docker image is: 
OS: Alpine Linux v3.19 on Windows 10 x86_64 
Kernel: 5.15.167.4-microsoft-standard-WSL2 
Packages: 81 (apk)  

The fonts are Arial and Times New Roman. I added them with msttcorefonts-installer pkg in dockerfile  with `apk` pkg manager.
Before we added, it was throwing exceptions on rendering. But now, it is rendering successfully, but the result is not like we want 

I attached the csharp code file and the trdp file. But the forum does not accept the cs and trdp file extensions. I changed cs extension to txt and trdp extension to JPG. You will need to change the file extension in order to open.

Thanks again for your time 

Said

said
Top achievements
Rank 1
commented on 24 Apr 2025, 01:27 PM

Hi Todor, my friend just discovered this behviour happens when you 'justify' the text box with this:
We dont know if this is the only cause. But at least we know this causes the text shift.

fyi

Thanks,

Said

Todor
Telerik team
commented on 29 Apr 2025, 08:14 AM

Hello Said,

Skia is a GDI-independent graphics engine that we integrated into Telerik Reporting starting with R3 2023 (17.2.23.1010). It lets you deploy our Reporting tool on Linux and Mac with .NET 7+ as they don't support GDI (System.Drawing) on non-Windows machines - System.Drawing.Common is not supported on non-Windows platforms - .NET 6 and .NET 7 under Linux and MacOS. I cannot explain how your .NET 7 application works on Linux with your current Reporting version.

Did you test with newer Telerik Reporting? We have fixed multiple issues related to PDF rendering that you use based on the code. There are more on the way, for example, Line breaks in HtmlTextBox are not rendered correctly in PDF with some fonts.

In your TRDP report from the file 'design.JPG', I also noticed multiple overlaps indicated by the yellow warning triangles in the Standalone Report Designer. I suggest fixing them as they may lead to unexpected outcomes in some renderings.

I cannot run your report as there are Fields and Parameter values not available on our end. Can you send a minimal runnable report we may use for local investigation?

Tags
.NET Core
Asked by
said
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or