Hi,
We are encountering an exception when converting some documents to PDF. Our investigations show that the documents usually contain gradient fills, or similar drawing elements.
Please see the attached .NET Core code and test document to reproduce the error. The included test .docx file generates PDF successfully when run on a Windows server, but not on Linux (presumably because Aspose.Words uses SkiaSharp on Linux)?
Please see the Linux system details and console output below:
Aspose.Words 18.6.0
.NET Command Line Tools: (v2.1.105)
Commit SHA-1 hash: 141cc8d976
Ubuntu 18.04 LTS
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /usr/share/dotnet/sdk/2.1.105/
.NET Core Shared Framework Host
Version : 2.0.7
Build : 2d61d0b043915bc948ebf98836fefe9ba942be11
Console output:
Hello World!
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: bitmap
at SkiaSharp.SKCanvas.DrawBitmap(SKBitmap bitmap, Single x, Single y, SKPaint paint)
at .( , RectangleF )
at ..ctor( , RectangleF )
at .( )
at .( , , RectangleF )
at .( , RectangleF )
at .( , RectangleF )
at .( , Boolean , RectangleF )
at .( )
at . ( )
at . ( )
at . ( )
at . ( )
at . ( )
at . ( )
at . ( )
at .( , )
at . ( )
at . ( )
at Aspose.Words.Document.( , SaveOptions )
at Aspose.Words.Document.(Stream , String , SaveOptions )
at BWDocToPdf.Program.Main(String[] args) in /home/userb/BWDev/BWExperi/BWDocToPdf/BWDocToPdf/Program.cs:line 13