jasperreports 6.17.0 JRPdfExporter导出PDF,中文不显示
怎么处理
需要注意的是jrxml文件很多。

关键代码如下
response.setContentType("application/pdf");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-Disposition", "attachment;filename="+URLEncoder.encode(session.getAttribute("fileName")+".pdf", "UTF-8"));
outputStream = response.getOutputStream();
JRPdfExporter exporter = new JRPdfExporter();
SimplePdfExporterConfiguration reportConfiguration = new SimplePdfExporterConfiguration();
reportConfiguration.setCreatingBatchModeBookmarks(true);
exporter.setConfiguration(reportConfiguration);
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream));
exporter.exportReport();