Aspose.PDF - Cannot find any fonts installed on the system

Hello.

On some machines we are getting following exception when trying to open XPS file:

"Cannot find any fonts installed on the system."
at #=z0wu1kzQMV1b1NNCoN27SHDEjXCnb.#=zL3PUHSzybB0X(String #=zibFGOzs=, FontStyle #=zKRrS19Q=, String #=zjS8gERYv7mrf)\r\n   
at #=z0wu1kzQMV1b1NNCoN27SHDEjXCnb.#=zlEuB$hjl3hPX(String #=zibFGOzs=, Single #=z$nGqjV9z7y1_, FontStyle #=zKRrS19Q=, String #=zjS8gERYv7mrf)\r\n   
at #=z0wu1kzQMV1b1NNCoN27SHDEjXCnb.#=zlEuB$hjl3hPX(String #=zibFGOzs=, Single #=z$nGqjV9z7y1_, FontStyle #=zKRrS19Q=)\r\n   
at #=z3l_3xwPpDwe6$Rm66aUAJCoSIpP_n9ToA5FTnyY=.#=zLTHUG70=()\r\n   
at #=z3l_3xwPpDwe6$Rm66aUAJCoSIpP_n9ToA5FTnyY=..ctor()\r\n   
at #=zQsWaDX6yhFjlxKfoFv9kTNQxfgPh.#=zU36mrOjSxVyY(Stream #=znfr3wBEBtFfE, Document #=z08DK$b8gmeZT, XpsLoadOptions #=zb0_yJ8Y=, Boolean #=zkniKRotEsyEe)

Our source code is simple:

public void SaveXpsToPdf(Stream inputXpsStream, Stream outputPdfStream)
        {
            using (var document = new Document(inputXpsStream, new XpsLoadOptions()))
            {
                document.Save(outputPdfStream, SaveFormat.Pdf);
            }
        }

We render WPF controls to XPS and afterwards we use Aspose library for converting XPS to PDF.

Reproduced with:
Aspose.PDF 24.5.1
Runtime: .NET 8
OS: Microsoft Windows Server 2022 Standard 10.0.20348 N/A Build 20348

I attached XPS file that causes this error (it’s not PDF, you need to change extension to XPS).

TestXps1.xps.pdf (78.7 KB)

Hi, @michalrakoczy! I can’t reproduce this issue for now, and I kindly ask you to check if the font Segoe UI is present on your test PC.

I will create a task for this issue, but your information will help us find the reason more quickly.

@michalrakoczy
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): PDFNET-57683

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.

Thank you for answer.

The font “Segoe UI” is installed on the machine where error occurs:

image.png (30.6 KB)

Thank you! I will keep you updated regarding progress.