We are having an issue with aspose.net and would like some assistance. I conducted several tests, debugged the application multiple times, and concluded that the issue arises because Aspose is not inserting the image into the PDF due to the code running on a Linux container. This explains why the logo is added as expected when I execute the code on my machine. Initially, I suspected it might be related to the Aspose license. However, I manually integrated the license into the code, and no exceptions were thrown; moreover, the code continued to work locally and exhibited the same behavior in UAT. I attempted various Aspose methods to add the image to the PDF, but all were unsuccessful. Another point of interest was when I tried using Aspose’s addImage method, which threw an exception stating “System.Drawing.Common is not supported on non-Windows platforms.” After some research, I found that this method is indeed not recommended as it is not cross-platform. Therefore, the suggested method is to use AddStamp, which we are currently using, but it is not functioning.
If you are using Aspose.PDF for .NET and facing issues in Linux like environment, we recommend using Aspose.Pdf.Drawing for .NET instead of Aspose.PDF for .NET. Please remove or uninstall Aspose.PDF for .NET and install Aspose.Pdf.Drawing for .NET instead. Same code will work with both APIs except the recommended one does have any dependency on System.Drawing.Common and is launched to work in non-Windows environments. In case you still face any issues, please let us know by sharing some more details about the environment, error and sample code snippet.