Save Excel Workbook as PDF - images are displayed broken

Hi guys,
Since I switched from version 22.9.0 to the current version 22.11.0 of Cells, I have noticed completing problem.

In version 22.9.0 the PDF looks very good when it comes out.
Example PDF: Output_Cells_Version_ 22_9_0.pdf

If I save the workbook with version 22.11.0 large images do not looks good.
Example PDF: Output_Cells_Version_ 22_11_0.pdf

Attached a sample application with a sample file “Input.xlsx”.

I have this problem since the introduction of the “SkiaSharp” library.
See sceenshots.

Version_22_9_0.png (28.1 KB)
Version_22_11_0.png (33.3 KB)

Can you solve this problem?
The PDF files do not look nice now.

Output_Cells_Version_ 22_9_0.pdf (116.6 KB)
Output_Cells_Version_ 22_11_0.pdf (148.1 KB)
CellsToPDF.zip (256.3 KB)

Thanks for your support.

@akquinet,

Thanks for the sample documents and screenshots.

It looks like you do not specify “Target OS” when creating or configuring your application/project in VS.NET. You need to set “Target OS” to “Windows” while creating/configuring the .NET 6.0 project in VS.NET. See the document for your reference.
Please note:

  1. When you set the “Target OS” to “Windows” for your project, you will use “System.Drawing.Common” as a dependency on your Windows system for .NET 6.0 project.
  2. If the “Target OS” is “None” or you set to other options for your project, you will use “SkiaSharp” as a dependency for Windows system for .NET 6.0 project. Please also note that currently SkiaSharp does not support formats such as EMF in windows.

Let us know if you still find any issue.

Thanks for all the information.
Unfortunately, we are using Aspose.Cells in a Docker service, so we can’t switch to Windows as the target OS.
So far it has always worked smoothly. Can you tell me when you will switch to a more recent version of SkiaSharp?
Thanks for the support.

@akquinet

The lib System.Drawing.Common has lots of issues on non-windows platform.
According to the Mircrosoft document, System.Drawing.Comming will be only supported on Windows. In .Net6, you need to set "System.Drawing.EnableUnixSupport": true to enable it on non-windows platform. In next .Net, it may be totally removed for non-windows platform.

To use Aspose.Cells with SkiaSharp, please refer to the document: the lib SkiaSharp.NativeAssets.Linux is needed to run on Linux.
You can use SkiaSharp.NativeAssets.Linux 2.88.3 intead of SkiaSharp.NativeAssets.Linux 2.88.0, this will upgrade the SkiaSharp version used in Aspose.Cells from v2.88.0 to v2.88.3. Your image broken issue will be fixed.

<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.3" />

We will upgrade Aspose.Cells used SkiaSharp version from v2.88.0 to v2.88.3 in next release.

Thank you very much, that helps me a lot :slight_smile:

@akquinet,

You are welcome.