求助一个能支持中文,支持css,支持table标签及boder和colspan属性的解决方案
尝试使用过
Document document = new Document();
PdfWriter writer = PdfWriter.getInstance(document,
new FileOutputStream("pdf.pdf"));
document.open();
XMLWorkerHelper.getInstance().parseXHtml(writer, document,
new FileInputStream("index.html"));
document.close();
System.out.println("PDF Created!");
使用jar包版本 itextpdf 5.4.2.jar和xmlworker.5.4.jar 不支持中文
My solution: http://swordshadow.iteye.com/blog/1983935
How about princexml?
I have used itext for pdf processing before. xml worker is a library that I found on their company website that converts xml (xhtml) to pdf. You can try it.
xml worker