Open darwin0616 opened 6 years ago
PdfOptions options = PdfOptions.create();
options.fontProvider(new IFontProvider()
{ // ensure font
@Override
public Font getFont(String s, String s1, float v, int i, Color color)
{
return FontFactory.getFont(FontFactory.TIMES, "windows-1252", v, i ,color);
}
});
PdfConverter.getInstance().convert(xwpfDocument, baos, options);
I found a temporary solution to the problem. To manually replace the
<w:sym w:font="Wingdings 2 w:char="F052"/>
to
<w:r>
<w:rPr>
<w:rFonts w:ascii="Wingdings 2" w:hAnsi="Wingdings 2"/>
</w:rPr>
<w:t>R</w:t>
</w:r>
or just print "R" in Office Word with "Wingdings 2" font.
Similar to issue #129, I reproduced the method,
unfortunately, ☑ and ☐ are missing in PDF file. I try to print "familyName", but there is no "wingdings 2" or "wingdings2" !
In order to check my docx file, I convert my docx file to xml, and then <w:sym w:font="Wingdings 2 w:char="F052"/> ... <w:sym w:font="Wingdings 2 w:char="F0A3"/> ... exist in the xml file.
Please, I need some help! Thank you!