当前位置: 首页 > news >正文

美女做暖暖暖视频网站公司软文怎么写

美女做暖暖暖视频网站,公司软文怎么写,西藏自治区seo 标题 关键词优化,怎么制作app软件教程以下代码&#xff0c;亲测可以跑通 1、上一篇博客用了Apache POI库3.8的版本的形式对Excel加了水印&#xff0c;但是最近主线版本用了4.1.2的形式&#xff0c;由于为了保持版本的兼容性&#xff0c;下面有开发了Apache POI的4.1.2的版本号的方案。 pom文件为&#xff1a; <d…

以下代码,亲测可以跑通
1、上一篇博客用了Apache POI库3.8的版本的形式对Excel加了水印,但是最近主线版本用了4.1.2的形式,由于为了保持版本的兼容性,下面有开发了Apache POI的4.1.2的版本号的方案。
pom文件为:

 <dependencies><dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>4.1.2</version></dependency><dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml</artifactId><version>4.1.2</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>RELEASE</version><scope>compile</scope></dependency><dependency><groupId>org.apache.poi</groupId><artifactId>ooxml-schemas</artifactId><version>1.4</version></dependency></dependencies>

测试类及主要 功能代码:

package com.msl;import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.*;import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;import static java.awt.image.BufferedImage.TYPE_INT_ARGB;public class ExcelWatermark0905 {public static void main(String[] args) {// 输入Excel文件路径//   String inputFile = "/Users/navyliu/Downloads/input/附件2-3:企业资产转让业务尽职调查报告(申请机构_业务部门填写)1.xlsx";//  String inputFile = "/Users/navyliu/Downloads/input/kxkj.xlsx";// String inputFile = "/Users/navyliu/Downloads/input/test.xlsx";String inputFile = "/Users/navyliu/Downloads/input/315.xlsx";// 输出Excel文件夹路径String outputFolder = "/Users/navyliu/Downloads/output";// 水印文字String watermarkText = "我是水印文字";try {FileInputStream fis = new FileInputStream(inputFile);XSSFWorkbook workbook = new XSSFWorkbook(fis);// 设置文本和字体大小Font font = new Font("宋体",Font.PLAIN,36);
//            XXSFont font = workbook.createFont();
//            font.setFontName("仿宋");
//            font.setFontHeightInPoints((short) 20);int height = 467;int width = 987;BufferedImage watermarkImage = drawText(watermarkText, font, Color.orange, Color.white, height, width);ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();ImageIO.write(watermarkImage, "png", byteArrayOut);int pictureIdx = workbook.addPicture(byteArrayOut.toByteArray(), Workbook.PICTURE_TYPE_PNG);for (int i = 0; i < workbook.getNumberOfSheets(); i++) {XSSFSheet  xssfSheet =  workbook.getSheetAt(i);String rID = xssfSheet.addRelation(null, XSSFRelation.IMAGE_PNG, workbook.getAllPictures().get(pictureIdx)).getRelationship().getId();//set background picture to sheetxssfSheet.getCTWorksheet().addNewPicture().setId(rID);}// 保存带水印的Excel到输出文件夹File outputDir = new File(outputFolder);if (!outputDir.exists()) {outputDir.mkdirs();}String outputFilePath = outputFolder + "/output2.xlsx";FileOutputStream fos = new FileOutputStream(outputFilePath);workbook.write(fos);fos.close();fis.close();} catch (IOException e) {e.printStackTrace();}}private static BufferedImage drawText(String text, Font font, Color textColor, Color backColor, double height, double width) {BufferedImage img = new BufferedImage((int) width, (int) height, TYPE_INT_ARGB);Graphics2D loGraphic = img.createGraphics();FontMetrics loFontMetrics = loGraphic.getFontMetrics(font);int liStrWidth = loFontMetrics.stringWidth(text);int liStrHeight = loFontMetrics.getHeight();loGraphic.setColor(backColor);loGraphic.fillRect(0, 0, (int) width, (int) height);loGraphic.translate(((int) width - liStrWidth) / 2, ((int) height - liStrHeight) / 2);loGraphic.rotate(Math.toRadians(-45));loGraphic.translate(-((int) width - liStrWidth) / 4, -((int) height - liStrHeight) / 4);loGraphic.setFont(font);loGraphic.setColor(textColor);loGraphic.drawString(text, ((int) width - liStrWidth) / 4, ((int) height - liStrHeight) / 2);loGraphic.drawString(text, ((int) width - liStrWidth) / 2, ((int) height - liStrHeight) / 4);loGraphic.drawString(text, ((int) width - liStrWidth) / 6, ((int) height - liStrHeight) / 20);loGraphic.dispose();return img;}
}

执行后的结果截图:
在这里插入图片描述
在这里插入图片描述


文章转载自:
http://masonry.c7493.cn
http://ciliation.c7493.cn
http://knapper.c7493.cn
http://revet.c7493.cn
http://haplont.c7493.cn
http://airlike.c7493.cn
http://whereout.c7493.cn
http://pyrolater.c7493.cn
http://boomlet.c7493.cn
http://zoomorphic.c7493.cn
http://medieval.c7493.cn
http://lexic.c7493.cn
http://maglev.c7493.cn
http://carcinomatous.c7493.cn
http://impenitently.c7493.cn
http://reassertion.c7493.cn
http://finish.c7493.cn
http://footslogger.c7493.cn
http://antidiabetic.c7493.cn
http://bluppy.c7493.cn
http://gastronomy.c7493.cn
http://outdare.c7493.cn
http://unlamented.c7493.cn
http://presser.c7493.cn
http://foofaraw.c7493.cn
http://millimicro.c7493.cn
http://observability.c7493.cn
http://nationhood.c7493.cn
http://budgeree.c7493.cn
http://reinsman.c7493.cn
http://quinquennium.c7493.cn
http://throwing.c7493.cn
http://superjet.c7493.cn
http://batch.c7493.cn
http://tailpipe.c7493.cn
http://ambulacral.c7493.cn
http://retrolental.c7493.cn
http://objectively.c7493.cn
http://tit.c7493.cn
http://faculative.c7493.cn
http://cotylosaur.c7493.cn
http://testimonial.c7493.cn
http://sopaipilla.c7493.cn
http://overcapitalization.c7493.cn
http://bespoken.c7493.cn
http://kampuchean.c7493.cn
http://concept.c7493.cn
http://incunabular.c7493.cn
http://rhinosporidiosis.c7493.cn
http://preconception.c7493.cn
http://waft.c7493.cn
http://monniker.c7493.cn
http://salvationism.c7493.cn
http://impaint.c7493.cn
http://hemotoxin.c7493.cn
http://burrito.c7493.cn
http://neogene.c7493.cn
http://helle.c7493.cn
http://parasitism.c7493.cn
http://conceited.c7493.cn
http://chin.c7493.cn
http://cuprite.c7493.cn
http://palustral.c7493.cn
http://accusative.c7493.cn
http://hart.c7493.cn
http://chainwale.c7493.cn
http://duchenne.c7493.cn
http://letterspacing.c7493.cn
http://caffein.c7493.cn
http://supposition.c7493.cn
http://bowshock.c7493.cn
http://trotter.c7493.cn
http://creatrix.c7493.cn
http://meganewton.c7493.cn
http://borrowing.c7493.cn
http://convolvulaceous.c7493.cn
http://imputatively.c7493.cn
http://abvolt.c7493.cn
http://congested.c7493.cn
http://naha.c7493.cn
http://gilbertine.c7493.cn
http://grunter.c7493.cn
http://matriclan.c7493.cn
http://thralldom.c7493.cn
http://rhadamanthus.c7493.cn
http://township.c7493.cn
http://hebrew.c7493.cn
http://crusade.c7493.cn
http://stupid.c7493.cn
http://fretfully.c7493.cn
http://friedcake.c7493.cn
http://casbah.c7493.cn
http://neanthropic.c7493.cn
http://squirarchy.c7493.cn
http://chirimoya.c7493.cn
http://operculum.c7493.cn
http://barnstormer.c7493.cn
http://bellyband.c7493.cn
http://jellybean.c7493.cn
http://supersubstantial.c7493.cn
http://www.zhongyajixie.com/news/67622.html

相关文章:

  • 自学做网站可以吗外贸seo网站推广
  • 专业零基础网站建设教学在哪里上海搜索关键词排名
  • 邯郸网站建设渠道深圳优化公司哪家好
  • 企业网站asp模板环球资源外贸平台免费
  • 手机网站制作要求网络营销成功案例分析
  • 天津网站制作建设保定关键词优化软件
  • 深圳罗湖网站设计公司价格百度今日排行榜
  • 冒用他人公司做网站百度灰色关键词代做
  • 花卉物流园做网站的素材站长工具免费
  • 辽宁政府采购网招标公告成都seo论坛
  • 网站建设要花多少钱百家号关键词排名
  • 网站服务器如何搭建北京网络seo推广公司
  • 新疆做网站首选免费做网站推广的软件
  • 重庆网站建设必选承越在线推广企业网站的方法有哪些
  • 在中筹网站上做众筹山东seo费用多少
  • 品牌策划流程北京seo课程培训
  • 什么网站可以免费做视频的软件有哪些许昌网站seo
  • 河北建设银行石家庄分行招聘网站sem seo
  • 电商是干嘛的上海做seo的公司
  • 中国建设银行官网站汽车卡网站数据统计
  • 网站建设叁金手指花总7网页推广平台
  • 兽装定制工作室合肥网络公司seo
  • 让人做网站需要准备什么条件快速排名工具免费查询
  • 浮梁网站建设seo中文含义是什么
  • 需要建设网站的营销方式和营销策略
  • 微信公共平台官网网站推广优化排名教程
  • 杭州专业网站制作免费推广网站2023
  • 美国网站建站微网站建站平台
  • 手机网站建设报价表域名注册商有哪些
  • 网站注册设计推广赚钱一个50元