Aspose.Pdf.ImagePlacementAbsorber.Visit() uses System.Drawing.Common on Linux

Hello, I’ve been debugging for the past few days this issue.
I’m running all Aspose versions on 24.4.0
Dotnet 6.0
I’ve seen on a few posts here that the recommendation is to use Aspose.Drawing, but it clashes with System.Drawing.Common.ImageFormat, so I opted to using Aspose.Pdf.Drawing.

The issue I’m having is that Aspose.Pdf.Drawing doesn’t have ImagePlacementAbsorber capabilities, and only Aspose.Pdf does, which relies heavily on System.Drawing.Common which doesn’t run on linux

System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms.

Since I have to use Aspose.Pdf.ImagePlacementAbsorber and Aspose.Pdf only uses the mentioned problematic reference I don’t see a workaround and I’ve been stuck for the past few days.

I have to use ImagePlacementAbsorber since it gives me access to the position of the image, the rectangle, and the stream itself.

I’ve just tried running it with Aspose.Pdf 24.9 and got the same error message.

Thanks in advance,
Joey.

For some reason you need to uninstall both Aspose.Pdf and Aspose.Pdf.Drawing and then re-install Aspose.Pdf.Drawing for its Aspose.Pdf.dll to take full effect.
That’s the reason it looked like Aspose.Pdf.Drawing doesn’t have the full functionality of Aspose.Pdf such as ImagePlacementAbsorber.

After doing that, dockerizing my project and running it on my pod it seems to be working as intended.
Running on Aspose.PDF.Drawing 24.3.0 and works fine for now. Will update if I encounter more issues!

@joeyrogers60

Its nice to know that things have started working at your end. Please feel free to create a new topic in case you face any issues.