This is a migrated thread and some comments may be shown as answers.

Problem with generating report on linux

1 Answer 414 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michal
Top achievements
Rank 1
Michal asked on 19 Dec 2019, 02:09 PM

Hi,

I created a report using a telerik report designer and save as trdp file. I run this report in .net core application and generate the pdf files like this:

Report report;
using (var sourceStream = System.IO.File.OpenRead(ReportFilePath))
{
    var reportPackager = new ReportPackager();
 
     report = (Report)reportPackager.UnpackageDocument(sourceStream);
}
 
var irs = CreateReportSource(reportHeader, account, report);
 
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
 
var renderedReport = reportProcessor.RenderReport("PDF", irs, null);
 
return renderedReport.DocumentBytes;

 

The problem is that the report is wrong generating on linux machine. (On windows looks ok)

Could you tell me where is the problem?

 

I use RHEL7 with dotnet 2.1 runtime.

Please check the attached screenshots

 

Thanks for the answer

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 23 Dec 2019, 01:39 PM

Hello Michal,

I checked the attached screenshots I agree that the text rendering on Linux is incorrect. It differs from the rendering on Windows, because of the different graphics libraries on both platforms. On Windows we use GDI+ to measure and split our text in lines and it produces quite good results. However, on Linux there is no exact GDI+ implementation and to achieve this functionality we use libgdiplus library - a Mono implementation of GDI+ API for non-Windows operating systems. However, this library has some flaws - one of them is the measurement of multi-line text, just as in your scenario. Since the libgdiplus project is being actively developed, I can recommend to try to update your Linux distribution with one of the latest releases of libgdiplus and see if the problem is resolved. One of our QA engineers recently wrote a KB article that demonstrates two approaches to update the currently installed libgdiplus from its repository. The KB is not yet merged to our official documentation, but still can be seen here: 
https://github.com/telerik/reporting-docs/blob/ffbf0ad90a901c4d3abe6bef252709af00f367b5/knowledge-base/how-to-build-and-Install-libgdiplus-linux.md

Please give it a try and let us know if it helps.

Regards,
Ivan Hristov
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Michal
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question
or