Image not rendered correctly in PDF conversion on Linux with Docker

Hi,

we run Aspose.Cells inside a Linux Docker container and noticed an issue with an image which is not rendered correctly in a PDF created by Aspose.
2024-07-11_08-44-14.png (99.5 KB)

// See https://aka.ms/new-console-template for more information

using Aspose.Cells;

Console.WriteLine("Hello, World!");

var lic = new License();
lic.SetLicense(@"./workspace/Aspose.Total.NET.lic");

var wb = new Workbook(@"./workspace/example.xlsx");
wb.Save(@"./workspace/out.pdf", SaveFormat.Pdf);

Project is configured as Net 7 and SkiaSharp.NativeAssets.Linux is installed through nuget as well.

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Aspose.Cells" Version="24.6.0" />
    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
    <PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.8" />
  </ItemGroup>

</Project>

Dockerfile for reproduction:

#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["ConsoleApp6/ConsoleApp6.csproj", "ConsoleApp6/"]
RUN dotnet restore "./ConsoleApp6/ConsoleApp6.csproj"
COPY . .
WORKDIR "/src/ConsoleApp6"
RUN dotnet build "./ConsoleApp6.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./ConsoleApp6.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

FROM base AS final
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0
WORKDIR /app

#Include contrib archive to install windows fonts. Must run before package update
RUN sed -i'.bak' 's/$/ contrib/' /etc/apt/sources.list

#Installs "windows fonts"
RUN apt-get update && apt-get install -y ttf-mscorefonts-installer fontconfig

#Install required packages, see example at https://docs.aspose.com/cells/net/how-to-run-aspose-cells-in-docker/
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

#SkiaSharp dependency of Aspose Cells requires libfontconfig1. See Aspose documentation for this. 
RUN apt-get update && apt-get install -y libfontconfig1

#ICU for Culture Information
RUN apt-get update && apt-get install -y libicu-dev


COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ConsoleApp6.dll"]

compose example

services:
  testapp:
    image: consoleapp6:latest
    volumes:
      - ./workspace:/app/workspace/
    restart: no

Sample input and output file:
workspace.zip (10.1 KB)

@Serraniel
By testing on the latest version v24.6 using sample file, we can reproduce the issue. Found that the image is not rendered correctly in pdf conversion on linux with Docker.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-56189

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.