I try to load a pdf in memory stream and copy to an other memory stream. In mac and windows os execution it’s works but in docker I have an exception :
System.NullReferenceException: Object reference not set to an instance of an object.
byte[] buff = File.ReadAllBytes(“file.pdf”);
using (var memoryStream = new MemoryStream(buff))
We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFNET-51661. You will be notified via this forum thread once this issue is resolved.
Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
RUN apt-get update && apt-get install -y libgdiplus
RUN sed -i'.bak' 's/$/ contrib/' /etc/apt/sources.list
RUN apt-get update; apt-get install -y ttf-mscorefonts-installer fontconfig