文件名称:使用 itext、flying-saucer 实现html转PDF
文件大小:2.31MB
文件格式:ZIP
更新时间:2022-03-12 10:03:41
html转PDF core-rendere flying-sauce iText-2.0.8.
ITextRenderer renderer = new ITextRenderer(); ITextFontResolver fontResolver = renderer.getFontResolver(); fontResolver.addFont("C:/Windows/fonts/simsun.ttc", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); os = new ByteArrayOutputStream(); String htmlstr = "你的HTML字符串"; renderer.setDocumentFromString(htmlstr); renderer.layout();
【文件预览】:
iText-2.0.8.jar
core-renderer.jar