diff --git a/casic-metering-common/src/main/java/com/casic/missiles/utils/PdfUtil.java b/casic-metering-common/src/main/java/com/casic/missiles/utils/PdfUtil.java index 3e4f58b..0814431 100644 --- a/casic-metering-common/src/main/java/com/casic/missiles/utils/PdfUtil.java +++ b/casic-metering-common/src/main/java/com/casic/missiles/utils/PdfUtil.java @@ -65,20 +65,20 @@ is = new FileInputStream(new File(wordPath)); WordprocessingMLPackage mlPackage = WordprocessingMLPackage.load(is); Mapper fontMapper = new IdentityPlusMapper(); - fontMapper.put("隶书", PhysicalFonts.get("LiSu")); +// fontMapper.put("隶书", PhysicalFonts.get("LiSu")); fontMapper.put("宋体", PhysicalFonts.get("SimSun")); - fontMapper.put("微软雅黑", PhysicalFonts.get("Microsoft Yahei")); +// fontMapper.put("微软雅黑", PhysicalFonts.get("Microsoft Yahei")); fontMapper.put("黑体", PhysicalFonts.get("SimHei")); - fontMapper.put("楷体", PhysicalFonts.get("KaiTi")); - fontMapper.put("新宋体", PhysicalFonts.get("NSimSun")); - fontMapper.put("华文行楷", PhysicalFonts.get("STXingkai")); - fontMapper.put("华文仿宋", PhysicalFonts.get("STFangsong")); - fontMapper.put("宋体扩展", PhysicalFonts.get("simsun-extB")); - fontMapper.put("仿宋", PhysicalFonts.get("FangSong")); - fontMapper.put("仿宋_GB2312", PhysicalFonts.get("FangSong_GB2312")); - fontMapper.put("幼圆", PhysicalFonts.get("YouYuan")); - fontMapper.put("华文宋体", PhysicalFonts.get("STSong")); - fontMapper.put("华文中宋", PhysicalFonts.get("STZhongsong")); +// fontMapper.put("楷体", PhysicalFonts.get("KaiTi")); +// fontMapper.put("新宋体", PhysicalFonts.get("NSimSun")); +// fontMapper.put("华文行楷", PhysicalFonts.get("STXingkai")); +// fontMapper.put("华文仿宋", PhysicalFonts.get("STFangsong")); +// fontMapper.put("宋体扩展", PhysicalFonts.get("simsun-extB")); +// fontMapper.put("仿宋", PhysicalFonts.get("FangSong")); +// fontMapper.put("仿宋_GB2312", PhysicalFonts.get("FangSong_GB2312")); +// fontMapper.put("幼圆", PhysicalFonts.get("YouYuan")); +// fontMapper.put("华文宋体", PhysicalFonts.get("STSong")); +// fontMapper.put("华文中宋", PhysicalFonts.get("STZhongsong")); mlPackage.setFontMapper(fontMapper); os = new java.io.FileOutputStream(pdfPath); //docx4j docx转pdf