Images Not Working on Linux Container

Posted by: developersupport on 19 May 2021, 5:49 am EST

  • Posted 19 May 2021, 5:49 am EST

    We are having issues with image in when using PDF export from a Linux Docker container on Active Reports 15.

    I have verified the libgdiplus library has been installed and we have a blank Picture control. We have tried setting the image of the Picture control from an array of bytes in code as well as setting the image via the report designer and a hyperlink.

    This is for the ASP.NET Core Runtime 5.0 container. mcr.microsoft.com/dotnet/aspnet:5.0

  • Posted 4 June 2021, 2:38 am EST

    Any updates on this? This is a pretty major issue for us if we can’t include images on reports in a Linux container.

  • Posted 7 June 2021, 3:36 pm EST

    Hello,

    I am really sorry for the delay. We are working on this and will update you once I am able to replicate the issue at my end.

    Thanks,

    Mohit

  • Posted 9 June 2021, 5:18 am EST

    Hello,

    Request to please confirm the steps:

    1: Run the Docker with Linux container

    2: Create the image from the following link:

    https://hub.docker.com/_/microsoft-dotnet-aspnet

    3: Created a Asp.Net Core app to export the PDF

    4: Deploy the application on the docker image

    5: Open the link in Web Browser to export the PDF

    Thanks,

    Mohit

  • Posted 28 July 2021, 3:35 am EST - Updated 30 September 2022, 7:27 am EST

    Yes, we are running a docker image built on top of the ‘mcr.microsoft.com/dotnet/aspnet:5.0’ docker image that runs on a Linux Kubernetes cluster. We have code that creates a SectionReport and then calls report.LoadLayout() with an XmlReader. We then set the Picture control Image property to a System.Drawing.Image instance. Then we use PdfExport to output a pdf to a byte array. Once we open that pdf the images do not render. This works locally on my Windows dev box but running in the Linux container doesn’t work.

  • Posted 29 July 2021, 6:03 am EST

    Can you please make sure all the required ActiveReports references are added to your project especially the ones related to Imaging and rendering:

    -GrapeCity.ActiveReports.Export.Image

    -GrapeCity.ActiveReports.Core.Export.Image.Page

    -GrapeCity.ActiveReports.Core.Drawing.Gc

    -GrapeCity.ActiveReports.Core.Rendering

    -GrapeCity.ActiveReports.Core.Drawing.Gdi

  • Posted 2 August 2021, 2:43 am EST

    I have installed all of the packages explicitly and updated our packages to 15.1.7 and we are still not seeing any images rendered. Let met know if you need any more information.

  • Posted 2 August 2021, 10:40 pm EST

    In that case, I would need to look at your application itself to replicate the issue and see what could be causing it. Can you please send it across (or at least the Report and the Image you’re trying to display)?

  • Posted 4 August 2021, 2:46 am EST

    Hello,

    I have attached a sample project the replicates the issue. If you open the ActiveReportsSample.sln and run the web application in Visual Studio, you can generate the report and notice the demo logo in the top left hand of the generated pdf.

    I have a PowerShell script in the directory, start-web-app.ps1, if you run this script it will build and run a Docker image, if you generate the pdf the demo logo in the top left is missing.

    When running the script the web application will be at [b]http://localhost:5130/[/b]

    You will also either need an environment variable named “gemBoxLicensekey” or replace this with a valid license key in the start-web-app.ps1 script.

    Let me know if you need anything clarification.

    ActiveReportsSample.zip

  • Posted 16 August 2021, 11:30 pm EST

    Hello,

    I have asked the development team for the same(AR-27128) and will inform you once I get any information from them.

    Thanks,

    Mohit

  • Posted 18 August 2021, 12:34 am EST

    Here is a better sample that removes GemBox so the license doesn’t have to be added.

    ActiveReportsSample.zip

  • Posted 13 September 2021, 1:26 am EST

    Are there any updates for this issue?

  • Posted 13 September 2021, 5:14 am EST

    Looks like that is now working in 15.2.0. Is there somewhere where we can look at release notes for each version?

  • Posted 13 September 2021, 5:38 pm EST

    Glad to know it is working in the latest version. You can keep a track of the release notes for each version here - https://www.grapecity.com/activereportsnet/releases/ar-15

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels