NullReferenceException when converting a DOCX to PDF

Hi,

When converting a DOCX to PDF using Aspose.Words, I got NullReferenceException.

Code:

var doc = new Document(@".\test.docx");
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.Save(@".\out.pdf");

The exception:

     System.NullReferenceException: Object reference not set to an instance of an object.
        at Aspose.Words.Themes.Theme.wlzu9jpn652rfznunjnnxf3ddlam7k7h    (ThemeColor )
        at    .(Int32 ,    )
        at    .(    ,     , Int32 ,    )
        at    .(   ,     ,     ,     , Int32 )
        at    . ()
        at    .()
        at    .(ShapeBase ,     )
        at    . ​     (    )
        at    .(ShapeBase )
        at    .(ShapeBase ,     )
        at    .(    , Boolean )
        at ​  .(    )
        at ​  .(    )
        at    .        ()
        at    .()
        at    .       ()
        at    .       ​()
        at    .        ()
        at    .()
        at    .(Boolean , Int32 )
        at    .(Boolean )
        at    .(    )
        at    .(    , Int32 )
        at    .(    )
        at    .(    )
        at    .(    , Int32 , Boolean )
        at    .(    , Int32 , Boolean )
        at    .()
        at    .(    , Int32 , Boolean , Boolean )
        at    .(    , Boolean )
        at    .(    )
        at    .(    , Int32 , Boolean )
        at    .()
        at    .(    , Int32 , Boolean , Boolean )
        at    .()
        at    .(    , Int32 )
        at    .(    , Int32 )
        at    .(    )
        at    .()
        at    .(    )
        at    .(    )
        at    .(    )
        at    . ()
        at    .()
        at Aspose.Words.Document.UpdatePageLayout()
        at ​  .​      ()
        at    .(    )
        at    .(    ,     )
        at    .(Node )
        at Aspose.Words.Document.UpdateFields()

I’ve attached the test document for your reference. Could you please help us take a look at this?

test.docx (84.1 KB)

Thanks,

@ServerSide527
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25212

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-25212) have been fixed in this Aspose.Words for .NET 23.5 update also available on NuGet.