问题描述
通过 fr.opensagres.poi.xwpf.converter.pdf-gae将 Word 转换为 PDF 时,勾选框(\u2611)无法显示
Word 中的勾选框通过以下方式创建:
- 输入 “2610” + ALT + X
- 插入 -> 符号 -> Wingdings 字符集中选择勾选框
- 代码中 addRun 插入 “☑” 或 “\u2610”
转换前:
转换后:
使用 pdf-gae 的代码,很简单:
InputStream is = Files.newInputStream(Paths.get(args[0]));
ByteArrayOutputStream bos = new ByteArrayOutputStream();
XWPFDocument xwpfDocument = new XWPFDocument(is);
PdfOptions pdfOptions = PdfOptions.create();
PdfConverter.getInstance().