Previously it looks like Aspose.Drawing was being used to support linux but in the latest (24.11.0) version of Aspose.PDF.Drawing it is referencing System.Drawing.Common again so get build conflicts now
The type ‘ImageFormat’ exists in both ‘Aspose.Drawing, Version=24.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ and 'System.Drawing.Common, Version=7.0.0.0,
Here are the listed dependencies for Aspose.PDF.Drawing 24.11.0
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyModel (>= 5.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Diagnostics.DiagnosticSource (>= 7.0.0)
- System.Diagnostics.PerformanceCounter (>= 4.5.0)
- System.Drawing.Common (>= 4.7.3)
- System.Net.Http.Json (>= 8.0.0)
- System.Reflection.Emit (>= 4.7.0)
- System.Security.Cryptography.Pkcs (>= 4.7.0)
- System.Security.Permissions (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 7.0.0)
- System.Text.Json (>= 8.0.3)
-
net7.0
- Microsoft.Extensions.DependencyModel (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
- System.Diagnostics.DiagnosticSource (>= 7.0.0)
- System.Diagnostics.PerformanceCounter (>= 4.5.0)
- System.Drawing.Common (>= 7.0.0)
- System.Security.Cryptography.Pkcs (>= 7.0.0)
- System.Security.Permissions (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 7.0.0)
My code is trying to use the PdfConverter object to convert the document, so basically
PdfConverter converter = new PdfConverter();
...
converter.GetNextImage(imageDataStream, System.Drawing.Imaging.ImageFormat.Png, 100);
This is where the ImageFormat conflict comes in.
What am I missing?
Thanks