admin管理员组

文章数量:1592449

1.导入maven相关依赖

<dependency>
			<groupId>com.itextpdf</groupId>
			<artifactId>itextpdf</artifactId>
			<version>5.4.3</version>
		</dependency>
		<dependency>
			<groupId>com.itextpdf</groupId>
			<artifactId>itext-asian</artifactId>
			<version>5.2.0</version>
		</dependency>

注意:1.asian如果版本低于5.0的话,导入数据时会报 "STSong-Light' with 'UniGB-UCS2-H' is not recognized"

          2.所有过程中,pdf模板在项目运行的时候尽量不要同时打开,不然报file reload异常


2.直接贴代码

@RequestMapping(value = "/editPDF2")
	@ResponseBody
	public Object editPDF2(String attr, HttpServletResponse response) throws IOException {
		//
		OutputStream ouputStream = response.getOutputStream();
		//json格式的String类型参数,直接转成map方便取值
		Map<String, Obje

本文标签: 模板数据itextPDF