@awais.hafeez
Thanks for your answer. I tried your suggestion but sadly it is not working like expected.
This is the code snipped I use for replacing the checkbox.
//Set CheckboxString and Segoe UI Symbol Font to currentRun
//pCheckboxToReplace: the utf8-sign of the checkbox (can be String.valueOf((char) 9746) or String.valueOf((char) 9744))
checkboxRun = (Run) pRun.deepClone(true);
checkboxRun.setText(pCheckboxToReplace);
checkboxRun.getFont().setName(“Segoe UI Symbol”);
//Set no Textstyle to Checkbox
checkboxRun.getFont().setBold(false);
checkboxRun.getFont().setItalic(false);
checkboxRun.getFont().setUnderline(0);
paragraph.insertAfter(checkboxRun, (firstRun != null ? firstRun : pRun));
Running the Code on a Windows OS I get the attached WindowsTest.pdf and if checking the properties of the Document the font Segoe UI Symbol is included.
When running the Code on a Linux OS the output pdf LinuxTest.pdf does not include the Segoe UI Symbol font and the cDocuments.zip (308.8 KB)
heckboxes are therefore shown like a unknown sign. Using “setEmbedFullFonts” does not make a difference at all.
What does make a difference is if you add any text to the word document in Segoe UI Symbol (WithSegoeUISymbol.docx) then everything works as it should. Output pdf : LinuxWithSegoeUiSymbol.pdf
The other word document which is used on both systems -> NoSegoeUISymbol.docx
Is there a possibility to get the result like the LinuxWithSegoeUiSymbol.pdf but with using the NoSegoeUISymbol.docx?
For your Information: One String which is replaced to a checkbox is LinuxTest.pdf (84.1 KB)
LinuxWithSegoeUiSymbol.pdf (68.9 KB)
WindowsTest.pdf (74.6 KB)
next to the text “Datennutzungserklärung vorliegend” on the first page of both word documents.