Hello,
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)){ memoryStream.Position = 0; //PDF Aspose.Pdf.Document srcDocument = new(memoryStream); Aspose.Pdf.Document dstDocument = new(); //save document pdf using (MemoryStream outStream = new()) { dstDocument.Save(outStream, SaveFormat.Pdf); } }
I’send you my project in attachement with the docker file
Thanks,
Regards,
Nicolas