没有合适的资源?快使用搜索试试~ 我知道了~
itexpdf+itext-asian解决STSong-Light问题
共2个文件
jar:2个
1星 需积分: 45 85 下载量 50 浏览量
2017-03-30
15:02:18
上传
评论
收藏 3.94MB ZIP 举报
温馨提示
itexpdf+itext-asian解决STSong-Light问题
资源推荐
资源详情
资源评论
收起资源包目录
itexpdf.zip (2个子文件)
itexpdf
itextpdf-5.4.5.jar 2MB
itext-asian.jar 2.07MB
共 2 条
- 1
资源评论
- 2015我的码农人生就此开始2018-09-06骗子 不能用tanya123abc2018-12-12刚测试过有效,Document document = new Document(PageSize.A4, 18, 18, 36, 36); document.setPageSize(PageSize.A4.rotate()); String finalfilename="E:\\\\\\\\test\\\\\\\\test1.pdf"; try { PdfWriter.getInstance(document, new FileOutputStream(finalfilename)); document.open(); BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H",BaseFont.NOT_EMBEDDED); Font FontChinese12 = new Font(bfChinese, 10, Font.NORMAL); Font FontChinese11 = new Font(bfChinese, 11, Font.ITALIC); PdfPTable table = new PdfPTable(3); PdfPCell cell; cell = new PdfPCell(new Phrase("今天天气好晴朗",FontChinese12)); cell.setColspan(3); table.addCell(cell); cell = new PdfPCell(new Phrase("处处好风光",FontChinese11)); cell.setRowspan(2); table.addCell(cell); table.addCell("row 1; cell 1"); table.addCell("row 1; cell 2"); table.addCell("row 2; cell 1"); table.addCell("row 2; cell 2"); document.add(table); document.close(); } catch (Exception e) { e.printStackTrace(); }finally{ }
tanya123abc
- 粉丝: 2
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功