itext 支持中文 PDF417
iText 5 0 2 jar int width 200; 图片宽度 int height 50; 图片高度 支持中文 设置中文编码 pdf setText URLEncoder encode soderString "utf 8" ; 容错等级 pdf setErrorLevel 8 public static void createPdf417 throws IOException{ BarcodePDF417 pdf new BarcodePDF417 ; pdf setText URLEncoder encode soderString "utf 8" ; Image pdfImg pdf createAwtImage Color black Color white ; BufferedImage img new BufferedImage int pdfImg getWidth null int pdfImg getHeight null BufferedImage TYPE INT RGB ; Graphics g img getGraphics ; g drawImage pdfImg 0 0 width height Color white null ; OutputStream os new BufferedOutputStream new FileOutputStream "d: pdf417 bmp" ; ImageIO write img "PNG" os ; String FilePath "d: images "+codeValue+" jpg"; 注释部分可以以文件方式保存 File f new File FilePath ; ImageIO write img "jpg" response getOutputStream ;">iText 5 0 2 jar int width 200; 图片宽度 int height 50; 图片高度 支持中文 设置中文编码 pdf setText URLEncoder encode soderString "utf 8" ; 容错等级 pdf setErrorLevel 8 public static void createPdf417 throws IOException{ BarcodePDF417 pdf new BarcodePDF417 ; [更多]
- 1
- 粉丝: 0
- 资源: 23
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- rain-ripples.PNG
- Gitlab: Python项目CI/CD实践 > fastapi-t1 > Dockerfile
- springboot的校园失物招领系统源码.zip
- Skeleton-Low Poly 低多边形骨架模型Unity插件美术资源包unitypackage
- Direct X修复工具
- Android教你如何一分钟实现下拉刷新功能项目完整实例代码
- 基于SpringBoot校园失物招领系统 前后端分离项目(mysql脚本在后端程序中).zip
- 使用JSTL需要的jar包程序文件
- 潘晓庆 321023199101293449。23-24年.xls
- 目标检测数据集(YOLOV5目录格式):花生检测(2类别,包含训练集、验证集)
- 1
- 2
前往页