跳过导航链接
E I T 

E

export(String) - 类 中的静态方法top.lshaci.framework.pdfUtils.ItextPdfUtils
Export PDF with html string, use the default fontPath(.
export(String, OutputStream) - 类 中的静态方法top.lshaci.framework.pdfUtils.ItextPdfUtils
Export PDF with html string, use the default fontPath(.
export(String, String) - 类 中的静态方法top.lshaci.framework.pdfUtils.ItextPdfUtils
Export PDF with html string
The html freemarker template need set body style,
For example: <body style = "font-family: SimSun;">
The sample code:

Map<String, Object> data = new HashMap<>();
String htmlStr = FreemarkerUtils.build(Test.class, "/pdf").setTemplate("test.ftl").generate(data);
ByteArrayOutputStream pdfOs = ItextPdfUtils.export(htmlStr, fontPath);

resp.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode("测试", "UTF-8") + ".pdf");
resp.setContentType("application/pdf");

ServletOutputStream outputStream = resp.getOutputStream();
outputStream.write(pdfOs.toByteArray());
export(String, String, OutputStream) - 类 中的静态方法top.lshaci.framework.pdfUtils.ItextPdfUtils
Export PDF with html string
The html freemarker template need set body style,
For example: <body style = "font-family: SimSun;">
The sample code:

Map<String, Object> data = new HashMap<>();
String htmlStr = FreemarkerUtils.build(Test.class, "/pdf").setTemplate("test.ftl").generate(data);
resp.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode("测试", "UTF-8") + ".pdf");
resp.setContentType("application/pdf");

ItextPdfUtils.export(htmlStr, fontPath, resp.getOutputStream());

I

ItextPdfUtils - top.lshaci.framework.pdfUtils中的类
Itext pdf utils
ItextPdfUtils() - 类 的构造器top.lshaci.framework.pdfUtils.ItextPdfUtils
 

T

top.lshaci.framework.pdfUtils - 程序包 top.lshaci.framework.pdfUtils
 
E I T 
跳过导航链接

Copyright © 2020. All rights reserved.