@Prem_Parmar Could you please attach the problematic input document here for testing? We will check the issue and provide you more information.
If you try to convert word document having simple bullets [~ symbol font] into PDF using aspose words in SUSE Environment, Issue is happening.
@Prem_Parmar Unfortunately, I cannot reproduce the problem on my side. Could you please attach the problematic input document here for testing?
Is it possible that if SUSE Linux System if don’t have Symbol font installed then This issue can be occurred. Can you please help on this, if your system has this font?
@Prem_Parmar It is not likely the problem might be caused by a missed font. If some font is not available, Aspose.Words simply uses an alternative font among the available ones or the last resort font embedded into Aspose.Words library.
@alexey.noskov, Issue is not for generating word document. Its working… Issue for PDF conversion. Is that thing applicable for Words to PDF conversion?
@Prem_Parmar Fonts are not required for generating MS Word documents. The above information about font is applicable only for document rendering, i.e. conversion to fixed page formats like PDF, XPS, Image etc.
Expected a value between 0 and 0.
Parameter name: index
java.lang.IllegalArgumentException: Expected a value between 0 and 0.
It’s specific to SUSE Linux only. Is it possible we can avoid this by some or other way… Because We can find a part of issue where from whole document only bullet is having issue…
Bullets have symbol fonts. and Our SUSE environment doesn’t have that…
@Prem_Parmar Could you please attach the document that causes the problem on your side here for testing?
@Prem_Parmar Thank you for additional information. unfortunately, the problem is not reproducible on my side. Code for testing:
Document doc = new Document("/temp/in.docx");
doc.save("/temp/out.pdf");
Dockerfile for testing:
FROM registry.suse.com/bci/openjdk-devel:17
COPY ./out/artifacts/TestJava_jar/ /tmp
WORKDIR /tmp
ENTRYPOINT ["java","-jar","TestJava.jar"]
Here is the produced output: out.pdf (15.8 KB)
1434544-203rd20Module20SYR-20250623_082940668_repaired.pdf (150.2 KB)
1434544-203rd20Module20SYR-20250623_082940668.pdf (144.0 KB)
I am sharing this PDF File generated from word document. When we have repaired PDF document, We are able to open it.
@Prem_Parmar Although we can’t reproduce the problem on our side, I see that Adobe.Acrobat throws a warning for the PDF document “The font ”FAACBA+SymbolMedium“ contains an invalid /BOX.”. This could possibly be due to a problem on your side.
@vyacheslav.deryushev, As I said earlier that from SUSE environment only we are seeing this issue and also Its for bullets having word. There should be something in those environment thats causing issue and fallback font of aspose is not handling that thing.
@Prem_Parmar Could you please provide the SymbolMedium font from the system where the problem is reproduced?
Thank you so much for quick response. We don’t have Mentioned font in the system. Here is the list of fonts in the system :
FC_List_Family_Fonts.pdf (122.4 KB)
@Prem_Parmar Thank you for the information provided.
First of all, please check Install TrueType Fonts on Linux in C#|Aspose.Words for .NET and install windows fonts on SUSE. Then if that doesn’t help, you can try using Google Noto’s free fonts Manipulate and Substitute TrueType Fonts in C#|Aspose.Words for .NET.
Please check this and if that doesn’t help, please provide the original docx file because I see that the provided file earlier is not the same as the provided PDF output file.
@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:
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?