test_checkbox.zip (18.3 KB)
test_checkbox_Linux.pdf (33.5 KB)
test_checkbox_Windows.pdf (43.2 KB)
When converting a Word document containing checkboxes to PDF on Linux host OS (our production environment), the checkboxes are converted to question mark boxes.
Conversion to PDF of the same document on Windows 10 OS is done correctly.
Using Aspose.PDF versie 19.1 for Java.
Java version = 1.8.0_231, Java Runtime Version = 188.8.131.52 - pxa6480sr6-20191107_01(SR6), Java Compiler = j9jit29, Java VM name = IBM J9 VM
Host Operating System:
Linux, version 2.6.32-754.36.1.el6.x86_64
Windows 10 Enterprise version 20H2
Request your help in solving this.
It seems like you are using Aspose.Words for the conversion. We have moved this post to the respective forum category where you will be assisted accordingly.
Please copy the latest versions of following font files from Windows 10 machine into a separate folder inside Linux machine and try running the following code of latest 21.2 version of Aspose.Words for Java:
Document doc = new Document("test_checkbox.docx");
FontSettings fontSettings = new FontSettings();
addFontFolder(fontSettings, myDir + "CustomFonts/");
private static void addFontFolder(FontSettings fontSettings, String folder)
FontSourceBase fontSourceBases = fontSettings.getFontsSources();
FontSourceBase newFontSourceBases = new FontSourceBase[fontSourceBases.length + 1];
System.arraycopy(fontSourceBases, 0, newFontSourceBases, 0, fontSourceBases.length);
newFontSourceBases[newFontSourceBases.length - 1] = new FolderFontSource(folder, true);
Do you see any missing fonts related warning messages? Please check the following articles:
Using IWarningCallback the cause of the problem on Linux became clear:
“Font ‘MS Gothic’ has not been found. Using ‘Calibri’ font instead. Reason: font info substitution.”
Thanks for the support.
It’s great that you were able to find what you were looking for. Please let us know any time you may have any further queries in future.