跳过导航链接
E I P T V 

E

export(String) - 类 中的静态方法top.lshaci.framework.pdf.ItextPdfUtils
Export PDF with html string, use the default fontPath(.
export(String, OutputStream) - 类 中的静态方法top.lshaci.framework.pdf.ItextPdfUtils
Export PDF with html string, use the default fontPath(.
export(String, String) - 类 中的静态方法top.lshaci.framework.pdf.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.pdf.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.pdf中的类
Itext pdf utils
ItextPdfUtils() - 类 的构造器top.lshaci.framework.pdf.ItextPdfUtils
 

P

PdfErrorInfo - top.lshaci.framework.pdf.enums中的枚举
PdfErrorInfo
PdfException - top.lshaci.framework.pdf.exception中的异常错误
PdfException
PdfException(PdfErrorInfo, Object...) - 异常错误 的构造器top.lshaci.framework.pdf.exception.PdfException
根据异常码和错误信息创建一个pdf异常

T

top.lshaci.framework.pdf - 程序包 top.lshaci.framework.pdf
 
top.lshaci.framework.pdf.enums - 程序包 top.lshaci.framework.pdf.enums
 
top.lshaci.framework.pdf.exception - 程序包 top.lshaci.framework.pdf.exception
 

V

valueOf(String) - 枚举 中的静态方法top.lshaci.framework.pdf.enums.PdfErrorInfo
返回带有指定名称的该类型的枚举常量。
values() - 枚举 中的静态方法top.lshaci.framework.pdf.enums.PdfErrorInfo
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
E I P T V 
跳过导航链接

Copyright © 2021. All rights reserved.