-
html转pdf,ITEXT转HTML为PDF解决中文不换行问题下载
资源介绍
1、core-renderer.jar该jar包修改过中文不换行问题
public static String getConversionHtmlCode(String linkcss,String htmlCode,String title){
String css = "";
css +="<style>";
css +="table{";
css +=" border-collapse: collapse;";
css +=" font-size: 15px;";
css +=" width: 98%;";
css +="}";
css +="";
css +="td{";
css +=" border: 1px solid #ddd;";
css +=" text-align: left;";
css +=" white-space: nowrap";
css +="}";
css +="th{";
css +=" border: 1px solid #ddd;";
css +=" text-align: left;";
css +="}";
css +="</style>";
String html = "<html><head>"+css+"</head><body margin:0;margin-top: 15px;margin-bottom: 15px; text-align: center; font-family:SimSun;\" >"+ title+"
"+ htmlCode + "</body></html>"; System.out.println("html:"+html); return html; }
"+ htmlCode + "</body></html>"; System.out.println("html:"+html); return html; }
- 上一篇: iText-html转pdf
- 下一篇: 导出PDF (iText实现) PdfDownloadDS