# pdf_ireport **Repository Path**: bestnewcoding_admin/pdf_ireport ## Basic Information - **Project Name**: pdf_ireport - **Description**: Spring Boot 集成 JasperReport 生成 PDF文档 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2020-08-25 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pdf_ireport Spring Boot 集成 JasperReport 生成 PDF文档 ## iReport #### 下载 > [地址](https://community.jaspersoft.com/download) #### 安装 ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173312_c5043e0b_904707.png "1.png") ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173322_39b8b167_904707.png "2.png") ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173330_2adae99b_904707.png "3.png") ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173337_66719647_904707.png "4.png") ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173347_84a85620_904707.png "5.png") ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173354_0cfdbd3d_904707.png "6.png") ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173400_ffe818f8_904707.png "7.png") #### helloword ![设计](https://images.gitee.com/uploads/images/2018/1129/173756_6e10e0ed_904707.png "1.png") ![预览](https://images.gitee.com/uploads/images/2018/1129/173811_a92ddb91_904707.png "2.png") ![工程目录](https://images.gitee.com/uploads/images/2018/1129/173823_eec49275_904707.png "3.png") > iReport[项目文件](https://gitee.com/Lixin_ma/pdf_ireport/attach_files/download?i=187752&u=http%3A%2F%2Ffiles.git.oschina.net%2Fgroup1%2FM00%2F05%2FBA%2FPaAvDFv_thiAYxj-AAAgtxJ4loM0.jrxml%3Ftoken%3D6390c0b7140551f18e152ca20596b6f2%26ts%3D1543484992%26attname%3Dhelloword.jrxml) > 解决问题:preview编译后可见,但是却预览为pdf后不可见 ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173903_ec9d7155_904707.png "4.png") ![输入图片说明](https://images.gitee.com/uploads/images/2018/1129/173911_73b75bab_904707.png "54.png") ##示例代码: @ApiOperation("test")
@GetMapping
public ModelAndView download() {
  Map map = new HashMap<>();
  map.put("name", "崔元辰");
  return new ModelAndView(new PdfView("templates/report/helloword.jasper", "helloword"),map);
}
> 项目中`com/lowagie/text/pdf/fonts/`和`com/lowagie/text/pdf/fonts/camps`也可删除然后单独引包,可在项目附件中得到[iTextAsianCmaps.jar](http://files.git.oschina.net/group1/M00/05/BA/PaAvDFv_sMWAFrTqABmIfLVe81w343.jar?token=37b08c0bad463efd859df65564211bd2&ts=1543483600&attname=iTextAsianCmaps.jar)和[itextasian-1.5.2.jar](https://gitee.com/Lixin_ma/pdf_ireport/attach_files/download?i=187741&u=http%3A%2F%2Ffiles.git.oschina.net%2Fgroup1%2FM00%2F05%2FBA%2FPaAvDFv_sKmAJ3ejAAUJT4bQTgI671.jar%3Ftoken%3Dfee39b3424730dbd6df30c62f3d04c00%26ts%3D1543483753%26attname%3Ditextasian-1.5.2.jar)