最近需要做一个生成pdf的功能,有很多工具,最终还是选择了itextpdf,废话就不多说了 直接撸代码。。。

实现生成pdf

1.引入jar

2. java逻辑代码 A.前端代码

3.controller层

4.工具类CreateDoc 解析数据 生成指定格式的pdf

5.iTextPDFUtil类生成pdf工具类包含样式等

1.引入jar包

xmlworker-5.5.11.jar
itextasian-5.5.9.jar
itextpdf-5.5.9.jar

2.java逻辑代码 A.前端代码

$("#export_pdf").off("click").on("click",function(){//隐藏表单下载var form = $("<form>");form.attr('style', 'display:none');form.attr('target', '');form.attr('method', 'post');form.attr('action', '/exportEnterpriseInfo.do');form.attr('enctype', 'multipart/form-data');//关闭form的自动编码,不然会出现中文乱码问题var input = $('<input>');input.attr('type', 'hidden');input.attr('name', 'data');input.attr('value', JSON.stringify(params));$('body').append(form);form.append(input);form.submit();form.remove();})

3.controller

 @RequestMapping("exportEnterpriseInfo")@ResponseBodypublic void exportEnterpriseInfo(HttpServletRequest request,HttpServletResponse response) throws Exception {//获取所有参数String data = request.getParameter("data");System.out.println(data);// 设置响应头,控制浏览器下载该文件response.setHeader("content-disposition", "attachment;filename="+ URLEncoder.encode("详情.pdf", "UTF-8"));
//      CreateDoc.create(response,JSON.parseObject(data)); //pdf保存路径String filePath = BaseInfo.getRealPath()+"/resources/gzmh/pdf/test.pdf";CreateDoc.create(response,filePath,JSON.parseObject(data));}

4.工具类CreateDoc 解析数据 生成指定格式的pdf

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;import org.apache.commons.lang.StringUtils;import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Chunk;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Element;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;/*** pdf报告类* @author pc**/
public class CreateDoc {/*** 生成表格 * @param user ZDR* @param formData 表格数据* @param chartData 图表数据* @param textData   文本数据* @param param 其它参数* @return* @throws Exception */public static String create(HttpServletResponse response, String filePath, JSONObject data) throws Exception {
//      Image image = Image.getInstance(IMG);File file = new File(filePath);//生成PDF文档Document document = new Document(PageSize.A4);PdfWriter.getInstance(document,new FileOutputStream(file));document.open();//背景图Image tImgCover = Image.getInstance(BaseInfo.getRealPath()+"/url.png");/* 设置图片的位置 */tImgCover.setAbsolutePosition(0, 0);/* 设置图片的大小 */tImgCover.scaleAbsolute(595, 842);document.add(tImgCover);document.addAuthor("作者名");//作者document.addCreationDate();//创建时间document.addCreator("http://baidu.com");//创建者document.addTitle("报告");//标题document.addSubject("报告");//主题document.addKeywords("iText 生成PDF 纯代码实现 表格 等效果 ");//关键字//顶部报告名称String  entname = data.getJSONObject("companyinfo").getString("entname");if(entname == null || StringUtils.isEmpty(entname)) {return null;}Paragraph paragraph = new Paragraph("", iTextPDFUtil.getColorFont(BaseColor.RED,19,"宋体"));paragraph.setLeading(50f);// 行间距paragraph.setAlignment(Element.ALIGN_CENTER); Chunk chunk1 = new Chunk(entname+"\n",iTextPDFUtil.getColorFont(BaseColor.BLACK,30,"宋体"));paragraph.add(chunk1);document.add( Chunk.NEWLINE);Chunk chunk3 = new Chunk("信息报告\n\n\n\n\n\n\n\n\n\n\n\n",iTextPDFUtil.getColorFont(BaseColor.BLACK,30,"宋体"));paragraph.add(chunk3);//报告日期SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");String date = sdf.format(new Date());Chunk chunk2 = new Chunk("日期:"+date,iTextPDFUtil.getColorFont(BaseColor.BLACK,30,"宋体"));paragraph.add(chunk2);document.add(paragraph);document.newPage();/*** 解析行政数据 生成表格* @param document* @param cateTitle* @param job* @throws Exception*/public static void createtable(Document document,String cateTitle,JSONObject job) throws Exception {if("基本信息".equals(cateTitle)) {JSONObject basicInfo = job.getJSONObject("companyinfo");System.out.println("基本信息"+JSON.toJSONString(basicInfo));getBasicData(document,"基本信息",basicInfo);}}/*** 解析基本信息* @param document* @param title* @param info* @throws DocumentException */public static void getBasicData(Document document,String title,JSONObject basicInfo) throws DocumentException {document.add(iTextPDFUtil.addTableGroupLine(title));PdfPTable tableBaseInfo = new PdfPTable(2);tableBaseInfo.setWidthPercentage(100);tableBaseInfo.setHorizontalAlignment(Element.ALIGN_LEFT);//基本信息//报告基础信息说明document.add(new Paragraph("信息名称:"+(basicInfo.getString("entname")==null?"无":basicInfo.getString("entname")),iTextPDFUtil.getColorFont(BaseColor.BLACK,12,"宋体")));document.add( Chunk.NEWLINE );document.newPage();}/*** 调用解析方法* @param document* @param title* @param info* @throws Exception*/public static void getTableData(Document document,String title,JSONArray info) throws Exception {document.add(iTextPDFUtil.addTableGroupLine(title));PdfPTable tableBaseInfo = new PdfPTable(2);PdfPCell cellBaseInfo = new PdfPCell();tableBaseInfo.setWidthPercentage(100);tableBaseInfo.setHorizontalAlignment(Element.ALIGN_LEFT);if("其他信息".equals(title)) {getContentOther(tableBaseInfo,cellBaseInfo,info);document.add(tableBaseInfo);}}/*** 其它信息解析* @param tableBaseInfo* @param cellBaseInfo* @param info* @throws Exception*/public static void getContentOther(PdfPTable tableBaseInfo,PdfPCell cellBaseInfo,JSONArray otherInfo) throws Exception {/********循环部分************///创建表格for (Object object : otherInfo) {JSONObject jo = JSON.parseObject(object.toString());//其它信息名称iTextPDFUtil.addTableGroupTitle(tableBaseInfo,cellBaseInfo,jo.getString("action_name")==null?"无":jo.getString("action_name"));//性别cellBaseInfo = new PdfPCell(new Phrase("性别",iTextPDFUtil.getColorFont()));tableBaseInfo.addCell(iTextPDFUtil.addBaseCell(cellBaseInfo));cellBaseInfo = new PdfPCell(new Phrase(jo.getString("implement_institution")==null?"无":jo.getString("implement_institution"),iTextPDFUtil.getColorFont()));tableBaseInfo.addCell(iTextPDFUtil.addBaseCell(cellBaseInfo));tableBaseInfo.setWidths(iTextPDFUtil.getColumnWiths(10f,30f));//核查建议
//              iTextPDFUtil.addSuggestLine(tableBaseInfo, cellBaseInfo, "该客户身份信息核验正常",new BaseColor(79,170,246));//添加空行tableBaseInfo.addCell(iTextPDFUtil.addBlankLine(20,2));}}/*** 添加水印* @param response* @param file* @throws Exception*/public static void addWaterMark(HttpServletResponse response, File file) throws Exception {FileInputStream input1 = new FileInputStream(file);ServletOutputStream output2 = response.getOutputStream();
//        FileOutputStream output2 = new FileOutputStream(new File(DEST));iTextPDFUtil.stringWaterMark(input1, output2, "水印名称", 7, 6, 0.1f,45, 16,BaseColor.BLACK);//文字水印
//        iTextPDFUtil.imageWaterMark(input1, output2, IMG, 0.2f);}
}

5.iTextPDFUtil类生成pdf工具类包含样式等

import java.io.FileInputStream;
import java.io.OutputStream;import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.Image;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfGState;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import com.itextpdf.text.pdf.codec.Base64.InputStream;public class iTextPDFUtil {/** @Description 蓝色背景色标题内容行添加* @param table 表格* @param cell  列* @param text  文本* @return void**/public static void addTableGroupTitle(PdfPTable table, PdfPCell cell, String text) {cell = new PdfPCell(new Phrase(text,getColorFont(BaseColor.WHITE)));table.addCell(addTitleCell(cell,25,new BaseColor(69,153,241),2,false));}/*** @Description 蓝色背景色标题内容行添加* @param table 表格* @param cell  列* @param text  文本* @param colspan 需要合并的列* @return void**/public static void addTableGroupTitle(PdfPTable table, PdfPCell cell, String text,int colspan) {cell = new PdfPCell(new Phrase(text,getColorFont(BaseColor.WHITE)));table.addCell(addTitleCell(cell,25,new BaseColor(69,153,241),colspan,false));}/*** @Description 核查建议* @param table 表格* @param cell 列* @param suggestText 核查建议内容* @param fontColor 核查建议内容文字颜色* @return com.itextpdf.text.Element**/public static void addSuggestLine(PdfPTable table,PdfPCell cell,String suggestText,BaseColor fontColor) throws Exception {addSuggestLine(table, cell, suggestText, fontColor, 0,10f,30f);}/*** @Description 核查建议* @param table 表格* @param cell 列* @param suggestText 核查建议内容* @param fontColor 核查建议内容文字颜色* @param colspan 合并的列* @param widths 列所占宽* @return com.itextpdf.text.Element**/public static void addSuggestLine(PdfPTable table,PdfPCell cell,String suggestText,BaseColor fontColor,int colspan,float...widths) throws Exception {cell = new PdfPCell(new Phrase("核查建议:",getColorFont()));cell.setColspan(1);table.addCell(addBaseCell(cell,23,new BaseColor(238,238,238),false));cell = new PdfPCell(new Phrase(suggestText,getColorFont(fontColor)));if(colspan>0){cell.setColspan(colspan);}table.addCell(addBaseCell(cell,23,new BaseColor(238,238,238),false));table.setWidths(getColumnWiths(widths));}/*** @Description 信息分组table* @param groupText 文本内容* @return com.itextpdf.text.Element**/public static Element addTableGroupLine(String groupText) {PdfPTable tableBaseInfoIndex = new PdfPTable(1);tableBaseInfoIndex.setWidthPercentage(20);PdfPCell cellBaseInfo = new PdfPCell(new Phrase(groupText,getColorFont()));cellBaseInfo.setHorizontalAlignment(Element.ALIGN_CENTER);tableBaseInfoIndex.addCell(addTitleCell(cellBaseInfo,28,new BaseColor(238,238,238),2,false));tableBaseInfoIndex.addCell(addBlankLine(10,1));return tableBaseInfoIndex;}/*** @Description 指定颜色字体 默认处理中文显示* @param color 字体颜色* @param fontSize 字体大小* @param fontFamily 字体* @return com.itextpdf.text.Font**/public static Font getColorFont(BaseColor color, int fontSize, String fontFamily) {Font font = new Font(getFont());font.setColor(color);if(fontSize>0&&(null!=fontFamily||!"".equals(fontFamily))){font.setSize(fontSize);font.setFamily(fontFamily);}return font;}/*** @Description 指定颜色字体 默认处理中文显示* @param color 字体颜色* @return com.itextpdf.text.Font**/public static Font getColorFont(BaseColor color) {return getColorFont(color, 0, null);}/*** @Description  默认处理中文显示* @return com.itextpdf.text.Font**/public static Font getColorFont() {Font font = new Font(getFont());return font;}/*** @Description 指定列宽度* @param widths 一个或多个* @return float[]**/public static float[] getColumnWiths(float...widths){float[] columnWidths = new float[widths.length];for (int i = 0; i < widths.length; i++) {columnWidths[i]=widths[i];}return columnWidths;}/*** @Description 添加表头cell* @param titleCell 要操作的cell* @param fixedHeight 行高度* @param baseColor 背景色* @param colspan  合并的列数* @param isBottomBorder 是否有下边框 true 有 fasle 没有* @return com.itextpdf.text.pdf.PdfPCell**/public static PdfPCell addTitleCell(PdfPCell titleCell,int fixedHeight,BaseColor baseColor,int colspan,boolean isBottomBorder){titleCell.setColspan(colspan);titleCell.setFixedHeight(fixedHeight);titleCell.setUseVariableBorders(true);titleCell.setUseAscender(true);titleCell.setUseDescender(true);titleCell.setBackgroundColor(baseColor);if(isBottomBorder){titleCell.setBorder(Rectangle.BOTTOM);titleCell.setBorderColorBottom(BaseColor.LIGHT_GRAY);}else{titleCell.setBorder(Rectangle.NO_BORDER);}titleCell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);return titleCell;}/*** @Description 添加空行* @param fixedHeight 空行高度* @param colspan  合并的列数* @return com.itextpdf.text.pdf.PdfPCell**/public static PdfPCell addBlankLine(int fixedHeight,int colspan){PdfPCell blankLine = new PdfPCell();blankLine.setFixedHeight(fixedHeight);blankLine.setBorder(Rectangle.NO_BORDER);blankLine.setColspan(colspan);return blankLine;}/*** @Description 添加默认cell* @Date  2019/7/12 11:36* @return com.itextpdf.text.pdf.PdfPCell**/public static PdfPCell addBaseCell(PdfPCell baseCell){baseCell.setFixedHeight(23);baseCell.setUseVariableBorders(true);baseCell.setUseAscender(true);baseCell.setUseDescender(true);baseCell.setBorder(Rectangle.BOTTOM);baseCell.setBorderColorBottom(BaseColor.LIGHT_GRAY);baseCell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);return baseCell;}/*** @Description 添加cell* @param isBottomBorder 是否有下边框 true 有 fasle 没有* @Date  2019/7/12 11:36* @return com.itextpdf.text.pdf.PdfPCell**/public static PdfPCell addBaseCell(PdfPCell baseCell,boolean isBottomBorder){baseCell.setFixedHeight(23);baseCell.setUseVariableBorders(true);baseCell.setUseAscender(true);baseCell.setUseDescender(true);if(isBottomBorder){baseCell.setBorder(Rectangle.BOTTOM);baseCell.setBorderColorBottom(BaseColor.LIGHT_GRAY);}else{baseCell.setBorder(Rectangle.NO_BORDER);}baseCell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);return baseCell;}/*** @Description 添加cell* @param baseCell 要操作的cell* @param fixedHeight 行高* @param color 背景色* @param isBottomBorder 是否有下边框 true 有 fasle 没有* @Date  2019/7/12 11:36* @return com.itextpdf.text.pdf.PdfPCell**/public static PdfPCell addBaseCell(PdfPCell baseCell,int fixedHeight,BaseColor color,boolean isBottomBorder){baseCell.setFixedHeight(fixedHeight);baseCell.setUseVariableBorders(true);baseCell.setUseAscender(true);baseCell.setUseDescender(true);if(null!=color){baseCell.setBackgroundColor(color);}if(isBottomBorder){baseCell.setBorder(Rectangle.BOTTOM);baseCell.setBorderColorBottom(BaseColor.LIGHT_GRAY);}else{baseCell.setBorder(Rectangle.NO_BORDER);}baseCell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);return baseCell;}/*** @Description 设置中文支持* @Date  2019/7/11 10:33* @Param []* @return com.itextpdf.text.pdf.BaseFont**/public static BaseFont getFont() {BaseFont bf = null;try {bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);} catch (Exception e) {System.out.println("Exception = " + e.getMessage());}return bf;}/*** 斜角排列、全屏多个重复的花式文字水印** @param input1             需要加水印的PDF读取输入流* @param output            输出生成PDF的输出流* @param waterMarkString   水印字符* @param xAmout            x轴重复数量* @param yAmout            y轴重复数量* @param opacity           水印透明度* @param rotation          水印文字旋转角度,一般为45度角* @param waterMarkFontSize 水印字体大小* @param color             水印字体颜色*/public static void stringWaterMark(FileInputStream input1, OutputStream output, String waterMarkString, int xAmout, int yAmout, float opacity, float rotation, int waterMarkFontSize, BaseColor color) {try {PdfReader reader = new PdfReader(input1);PdfStamper stamper = new PdfStamper(reader, output);// 添加中文字体BaseFont baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);int total = reader.getNumberOfPages() + 1;PdfContentByte over;// 给每一页加水印for (int i = 1; i < total; i++) {Rectangle pageRect = stamper.getReader().getPageSizeWithRotation(i);// 计算水印每个单位步长X,Yfloat x = pageRect.getWidth() / xAmout;float y = pageRect.getHeight() / yAmout;over = stamper.getOverContent(i);PdfGState gs = new PdfGState();// 设置透明度为gs.setFillOpacity(opacity);over.setGState(gs);over.saveState();over.beginText();over.setColorFill(color);over.setFontAndSize(baseFont, waterMarkFontSize);for (int n = 0; n < xAmout + 1; n++) {for (int m = 0; m < yAmout + 1; m++) {over.showTextAligned(Element.ALIGN_CENTER, waterMarkString, x * n, y * m, rotation);}}over.endText();}stamper.close();} catch (Exception e) {new Exception("NetAnd PDF add Text Watermark error"+e.getMessage());}}/*** 图片水印,整张页面平铺* @param input     需要加水印的PDF读取输入流* @param output    输出生成PDF的输出流* @param imageFile 水印图片路径*/public static void imageWaterMark(InputStream input, OutputStream output, String imageFile, float opacity) {try {PdfReader reader = new PdfReader(input);PdfStamper stamper = new PdfStamper(reader, output);Rectangle pageRect = stamper.getReader().getPageSize(1);float w = pageRect.getWidth();float h = pageRect.getHeight();int total = reader.getNumberOfPages() + 1;Image image = Image.getInstance(imageFile);image.setAbsolutePosition(0, 0);// 坐标image.scaleAbsolute(w, h);PdfGState gs = new PdfGState();gs.setFillOpacity(opacity);// 设置透明度PdfContentByte over;// 给每一页加水印float x, y;Rectangle pagesize;for (int i = 1; i < total; i++) {pagesize = reader.getPageSizeWithRotation(i);x = (pagesize.getLeft() + pagesize.getRight()) / 2;y = (pagesize.getTop() + pagesize.getBottom()) / 2;over = stamper.getOverContent(i);over.setGState(gs);over.saveState();//没这个的话,图片透明度不起作用,必须在beginText之前,否则透明度不起作用,会被图片覆盖了内容而看不到文字了。over.beginText();// 添加水印图片over.addImage(image);}stamper.close();} catch (Exception e) {new Exception("NetAnd PDF add image Watermark error" + e.getMessage());}}/*** @description 顶部表格卡片形式显示格式数据组装* @param tableMobileHeader 要操作的表格* @param cellMobileHeader 要操作的单元格* @param clospan 合并列 不需要合并填写0* @param fixedHeight 行高* @param padding 间距* @param border 边框* @param borderColor 边框颜色* @param backgroundColor 背景色* @param vertical 垂直对齐方式* @param horizontal  水平对齐方式* @return void**/public static void addTableHeaderData(PdfPTable tableMobileHeader, PdfPCell cellMobileHeader, int clospan, float fixedHeight, int padding, int border, BaseColor borderColor, BaseColor backgroundColor, int vertical, int horizontal) {cellMobileHeader.setUseBorderPadding(true);cellMobileHeader.setUseAscender(true);if(clospan>0){cellMobileHeader.setColspan(clospan);}cellMobileHeader.setUseDescender(true);cellMobileHeader.setFixedHeight(fixedHeight);cellMobileHeader.setPadding(padding);cellMobileHeader.setVerticalAlignment(vertical);cellMobileHeader.setHorizontalAlignment(horizontal);if(null!=backgroundColor){cellMobileHeader.setBackgroundColor(backgroundColor);}cellMobileHeader.setBorder(border);cellMobileHeader.setBorderColor(borderColor);tableMobileHeader.addCell(cellMobileHeader);}/*** @description 顶部表格卡片形式显示格式数据组装* @param tableMobileHeader 要操作的表格* @param cellMobileHeader 要操作的单元格* @param clospan 合并列 不需要合并填写0* @param backgroundColor 背景色* @return void**/public static void addTableHeaderData(PdfPTable tableMobileHeader, PdfPCell cellMobileHeader, int clospan,BaseColor backgroundColor) {addTableHeaderData(tableMobileHeader, cellMobileHeader, clospan, 100, 10, 30, BaseColor.WHITE, backgroundColor, 0, 0);}
}

itextpdf生成pdf,指定样式及文字水印相关推荐

  1. 【iText5 生成PDF】纯Java代码实现生成PDF(自定义表格、文本水印、单元格样式)

    工作中遇到需要生成PDF.最终选择了iText.其他也有通过html再生成.感觉不太适合就用了代码实现. 使用iText 5.5.13.1版本.纯Java代码实现 1.自定义表格合并指定行列完成数据填 ...

  2. java用itextPDF生成PDF文件保存至本地并上传至ftp服务器

    标题java用itextPDF生成PDF文件保存至本地并上传至ftp服务器 所需jar :itext-asian-5.2.0.jar,itextpdf-5.5.5.jar,commons-net-3. ...

  3. java pdf水印排布问题_java实现图片和pdf添加铺满文字水印

    依赖jar包 com.itextpdf itextpdf 5.3.2 com.itextpdf itext-asian 5.2.0 一,图片添加铺满水印 ======================= ...

  4. PDF加图片、文字水印(自动调整比例)

    前段时间为公司PLM系统新增了发图签章功能(即给PDF加图片和文字水印),写下来做个备注. 需要注意的是图片要求是透明的(PS可做),可以根据当前页大小自动调整显示比例. 需要用到的jar包.iTex ...

  5. Python项目实践(一)去除PDF指定区域内的水印

    目录 前言 对比图(水印去除前后) 一.原理 二.代码实现 三.使用教程 1. 文件夹目录(pic和res文件夹需提前创建好) 2. 执行第一步代码(注释掉其他代码,以下同理) 3. 执行第二步代码 ...

  6. java使用itextpdf生成PDF批量打印荣誉证书(指定位置输出文字)

    最近公司项目有个需求,批量打印荣誉证书,一开始尝试过传统的网络打印,控件打印,JS调用浏览器打印方法,遇到各种问题,比如定位不准,分页问题,​​缩放问题等.然后就自己研究,整理了一套打印方案,项目已测 ...

  7. java使用itextpdf生成pdf文档指定图片印章位置

    项目结构 1.引包 <dependencies><!-- itextpdf--><dependency><groupId>com.itextpdf< ...

  8. java使用itextpdf生成pdf并填充自定义数据

    项目中有个需求,对于已有的数据生成对应的发票pdf或者合同pdf,这些pdf具有一些特性,就是pdf有固定的格式,类似于表格,我们只要往表格里面填充数据即可.当然,也会涉及到签章,二维码等需求. 总体 ...

  9. 使用itextpdf生成pdf

    因为工作需要,最近项目中有一个需求需要生成带有项目信息的pdf,并且pdf中还需要有附带项目信息的二维码方便用户扫码.         做这个功能中踩了不少坑,写个博客提醒一下 springboot版 ...

  10. Java使用itextpdf生成PDF文件,用浏览器下载

    浏览器下载生成PDF文件 1.引入jar包 <dependency><groupId>com.itextpdf</groupId><artifactId> ...

最新文章

  1. 2. 把一幅图像进行平移。
  2. django forms 错误处理
  3. 【嵌入式开发】C语言 指针数组 多维数组
  4. typescript安装、数据类型及tsconfig配置项说明
  5. mysql libs 5.1.71_用python创建数据库监控平台(1)安装MySQL5.7
  6. vue 3.x 中使用ele-image时相对路径的图片加载失败
  7. leetcode双指针(python与c++)
  8. NameNode启动
  9. cuda与tensorflow版本对应关系
  10. 解决“远程会话已断开连接,因为访问被拒绝导致许可证存储的创建失败,请使用提升的权限运行远程桌面客户端”问题
  11. How to convert any valid date string to a DateTime.
  12. html调用eps,eps输出没有属性
  13. WinForm超市商品管理系统
  14. CANoe测试:CAPL Test Module的2种创建方式
  15. SylixOS -- 网卡驱动浅析
  16. 用JavaScript实现字体大小屏幕自适应
  17. 2022美赛D题题目及思路--数据瘫痪
  18. day01 pathon基础
  19. log4j2的一些配置,为某个类某个方法单独文件打印日志,定时删除日志和springboot的logback日志单独类打印
  20. C语言入门篇之练气化龙(八)(数组下卷)

热门文章

  1. python 输出结果图文混排_Django图文混排
  2. 基于MES的生产车间管理信息系统
  3. home目录权限linux,linux 文件/文件夹权限
  4. proxyconnect tcp: dial tcp: lookup proxy.example.com on 8.8.8.8:53: no such host
  5. 员工转正申请书_有限公司新员工转正申请书
  6. 【数据分享】2022年11月华东地区POI数据分享(上海、江苏、浙江、安徽)
  7. 如何批量打印 带图片名字的图片?Word 宏命令
  8. python六边形网格_六边形网格地图算法细节介绍
  9. CSS强制图像调整大小并保持纵横比
  10. 复合函数的间断点问题总结