Problem with generating report on linux

2 posts, 0 answers
  1. Michal
    Michal avatar
    1 posts
    Member since:
    Apr 2012

    Posted 19 Dec 2019 Link to this post


    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

  2. Ivan Hristov
    Ivan Hristov avatar
    220 posts

    Posted 23 Dec 2019 Link to this post

    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:

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

    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
Back to Top