Bug with old math formulas when converting doc/docx to PDF


I’m working in IT company and we are considering your product Aspose.Words for doc/docx to PDF convertion. But after some tests I’ve discovered bugs when document contains math formulas created in formulas editor 3.0. By the way I have different results on Windows and Linux. I’ve sent screenshots showing a problem below. Can I solve this problem in current version of Aspose.Words somehow?

It’s original document:
Original.png (10.1 KB)

It’s convertion to PDF on Windows:
Windows_bugs.png (48.1 KB)

It’s convertion to PDF on Linux:
Linux_bugs.png (54.1 KB)

@Username7255 Could you please attach your input MS Word documents and output PDFs produced on your side? We will check the issue and provide you more information.

Thank you for the reply!

docxtopdf_linux.pdf (46.0 KB)
docxtopdf_windows.pdf (80.5 KB)
test_formulas.docx (42.9 KB)

@Username7255 Thank you for additional information. The reason of the problem is lack of the required fonts. On Windows MT Extra font seems to missed on your side. Here is output PDF produced on my side: out_cpp.pdf (41.6 KB)
Here is MT Extra font MTEXTRA.zip (5.4 KB)
You can either install the required fonts or put them into the folder and use this folder as fonts source.

On Linux the same problem but even more required fonts are missed.

Thank you for reply.
Can I just substitute font with similar or another one in such cases without loading additional fonts? How to do this?

@Username7255 Aspose.Words applies a set of substitution rules when font is not available. You can configure these rules to make substitution algorithm to select the fonts more accurately from the fonts available in your environment.

Thank you for reply.

I’m trying to enable fontconfig substitution:

System::SharedPtr<FontSettings> fontSettings = System::MakeObject<FontSettings>()->get_DefaultInstance();

and getting exception:

terminate called after throwing an instance of 'System::ExceptionWrapper<System::Details_NotImplementedException>'
  what():  System::NotImplementedException: SharedPtr<System::IO::StreamReader> System::Diagnostics::Process::get_StandardOutput() const
Aborted (core dumped)

There is fontconfig on my system:
fontconfig is already the newest version (2.13.1-2ubuntu3)
Testing it on Ubuntu 20.04.3 LTS.
Why have I got this exception and what should I do?

@Username7255 Thank you for reporting this problem to us. I have managed to reproduce it. For a sake of correction it has been logged as WORDSCPP-1160. We will keep you informed and let you know once it is resolved.

Without fontconfig substitution resulting PDF looks bad.
How much time does it take to solve problem with fontconfig?
Can I fix this in Aspose.Words somehow now while problem is solving?

@Username7255 The issue is currently in development and is scheduled to be fixed before the next 22.2 release of Aspose.Words for C++. Please note this is an approximate estimate and can be shifted.
For now, you can try configuring TableSubstitutionRule to make Aspose.Words to substitute fonts according to the fonts available in your system.

I see that issue WORDSCPP-1160 is closed. Does it mean that problem is solved? If it is so, when and how can I test fixed version?

@Username7255 Yes, the issue is fixed in the current codebase. The fix will be included into the next version of Aspose.Words for C++, which will be available in a couple of weeks. We will let you know once it is released.

The issues you have found earlier (filed as WORDSCPP-1160) have been fixed in this Aspose.Words for C++ 22.2 update.