Aspose.Pdf.Drawing fails converting image to PDF/A

Setup
Host: Docker using image mcr.microsoft.com/dotnet/aspnet:6.0-focal

Dependencies

  • Aspose.Pdf.Drawing 23.2.0
  • Aspose.Drawing 23.2.0
  • SkiaSharp.NativeAssets.Linux.NoDependencies 2.88.3
  • Microsoft.Extensions.DependencyModel 6.0.0

Code
input.jpg (318.4 KB)

using PdfDocument = Aspose.Pdf.Document;

// Initialize new PDF document
var doc = new PdfDocument();

// Add empty page in empty document
var page = doc.Pages.Add();
var image = new Image();
image.File = inputFilename;

// Add image on a page
page.Paragraphs.Add(image);

// Save output PDF file
doc.Save(outputFilename);

Error

System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at #=z_8VKtooG4KReYBFLI5rHcs_089uDuyyUzw==.#=zMuYqLfU=(#=zqx$9Wws= #=zXEpC3Yw=)
   at #=zvP80FvsbIYWEjk4y0$u1K7fSruiME656xQ==.#=zNPz7HEXCS7Yb`2.#=zLow$MvdxYw03(#=zqx$9Wws= #=zXEpC3Yw=, #=z3HVD8Cg=& #=zFb9tWHU=)
   at #=z1lnBDC7qRoFdSgq65xD2gZ$GrZ3ueiM1sx8BsF8=.#=zcM3ONGJCpQTq(#=zPXg6mQVFOnGPCqr9NpHT7TlK9AG2 #=zHRtK9WqhS0SP)
   at #=zIRn9vQD5BlbDNj46oHuAkSeDkPQ_998t4iOb$RAi3jF1.#=zXkqkhcWt6bom()

@ILikeCranberries
Could you please attach the dockerfile used or its text

Dockerfile

FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal

SHELL ["/bin/bash", "-c"]

RUN apt-get update && apt-get -y install fontconfig libgdiplus rsync libldap-2.4-2
RUN fc-cache -fv

RUN mkdir -p /app
WORKDIR /app

ENV DOTNET_CLI_TELEMETRY_OPTOUT='1'

ENTRYPOINT ["dotnet", "AsposePoc.dll"]

@ILikeCranberries
Thank you for writing. I have reproduced the problem and will issue a task for this bug.

@ILikeCranberries
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): PDFNET-53937

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.