Hello,
Thanks for your inquiry!
Kindly note that when you install Spire.PDF via NuGet in your .NET6 project, it will use our .NET5 dlls by default. The .NET5 dlls all depend on System.Drawing when processing graphics. However, our .NETStandard dlls rely on SkiaSharp instead of System.Drawing. Therefore, when you add the reference of Spire.PDF to your project through NuGet, the conflict between Drawing and SkiaSharp may cause the not working of SaveAsImage method.
To use our .NETStandard dlls, please download Spire.PDF from
our website, and manually add the dlls from the folder “netstandard2.0” (see screenshot). In addition, you need to install the following dependencies via NuGet. Here I also attached
a runnable project for your reference.
dlls.png
• SkiaSharp (>= 1.68.0)
• System.Buffers (>= 4.5.0)
• System.Memory (>= 4.5.0)
• System.Runtime.CompilerServices.Unsafe (>= 4.5.0)
• System.Security.Cryptography.Xml (>= 4.5.0)
• System.Text.Encoding.CodePages (>= 4.5.0)
Sincerely,
Marcia
E-iceblue support team
Login to view the files attached to this post.