@vyacheslav.deryushev
Thank you so much for your prompt response. Really Appreciate ! I will follow this action plan and let you know if it helps or not.
Our Word output is working fine and Its only while saving pdf, We are getting this corruption issue.
We already have this for word to pdf :
FontSettings.getDefaultInstance().getSubstitutionSettings().getDefaultFontSubstitution().setDefaultFontName(substFont);
We have not yet added fallbackNoto thing but just wanted to verify that While saving from Word to PDF, We do see below warnings.
In PDF conversion logs, We are setting this -
2025-06-16T23:58:10,631-0300 [][RRDG_Thread-6838-SYNCHRONISED_EXECUTOR] WARN com.ibm.rational.rrdg - CRRPE3555W PDF warning: Arial Unicode MS font is used in the document. Line spacing could be rendered differently.
2025-06-16T23:58:10,631-0300 [][RRDG_Thread-6838-SYNCHRONISED_EXECUTOR] WARN com.ibm.rational.rrdg - CRRPE3555W PDF warning: Font 'Arial Unicode MS' has not been found. Using 'Times New Roman' font instead. Reason: font info substitution.
2025-06-16T23:58:10,631-0300 [][RRDG_Thread-6838-SYNCHRONISED_EXECUTOR] WARN com.ibm.rational.rrdg - CRRPE3555W PDF warning: Font 'Calibri' has not been found. Using 'Liberation Sans' font instead. Reason: table substitution.
2025-06-16T23:58:10,631-0300 [][RRDG_Thread-6838-SYNCHRONISED_EXECUTOR] WARN com.ibm.rational.rrdg - CRRPE3555W PDF warning: Font 'GT America Light' has not been found. Using 'Adobe New Century Schoolbook' font instead. Reason: first available font.
@Prem_Parmar DefaultFontSubstitution is penultimate substitution rule applied. To force it to be applied you should disable other substitution rules. The first available font substitution rule is applied after DefaultFontSubstitution rule:
https://docs.aspose.com/words/net/manipulating-and-substitution-truetype-fonts/#font-availability-and-substitution
Make sure you are using DefaultFontName correctly:
Aspose.Words.Fonts.FontSettings.DefaultInstance.SubstitutionSettings.FontInfoSubstitution.Enabled = false; // Important!
Aspose.Words.Fonts.FontSettings.DefaultInstance.SubstitutionSettings.DefaultFontSubstitution.DefaultFontName = "Times New Roman";
Aspose.Words.Fonts.FontSettings.DefaultInstance.SubstitutionSettings.DefaultFontSubstitution.Enabled = true;
Have you try to install missed fonts and check the results? Also, have you try to install SymbolMedium font?
2025-08-28T12:00:01,681+0530 [][RRDG_Thread-11976-SYNCHRONISED_EXECUTOR] DEBUG com.ibm.rational.rrdg - CRRPE3131E The Microsoft Word output could not be finalized.
Expected a value between 0 and 0.
Parameter name: index
java.lang.IllegalArgumentException: Expected a value between 0 and 0.
Parameter name: index
at com.aspose.words.internal.zzYS.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzKF.zzYO(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzKF.get(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzON.zzVF(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzOL.zzY(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzOL.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zz73.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zz73.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzP5.zzQ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzCG.zzQ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzCJ.zzy5(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzBB.zzW(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzC3.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzD7.zzW(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzD9.zzIN(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzBH.zzIN(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.zzYX9.zzZji(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.zzZU2.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.zzZ8E.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.Document.zzY(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.Document.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.Document.save(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
Can we Identify reason from this stack trace?
@Prem_Parmar Unfortunately, without ability to reproduce the problem on our side it is impossible to identify the reason of the problem using obfuscated stack trace.
I would suggest you to try using the latest 25.9 version of Aspose.Words instead of old 21.2.
@alexey.noskov
v25.10 is not possible as we have as of now no plan to upgrade the library. Latest we can use is 24.5v Aspose. And The thing is we are facing issue in SUSE Linux Environment not in Windows.
@Prem_Parmar I am afraid, we do not provide any fixed or patches for old versions of Aspose.Words. All fixes and improvements in the library are shipped with new versions.
Can’t we get information on why this exception is getting thrown while Converting word to pdf? Why generated PDF is corrupted?
@Prem_Parmar As it was mentioned above, we cannot reproduce the problem on our side, so we cannot provide any information why the problem occurs on your side.
@alexey.noskov Can we get information like does latest version of Aspose fixes this kind of or nearby area issue?
@Prem_Parmar Unfortunately, we cannot answer this question, because we simply cannot reproduce the problem on our side. So I would suggest you to try using the latest version and let us know if the problem still persists on your side. And if so, provide code and documents that will allow us to reproduce the problem.