印章源码
发布时间: 2022-09-03 00:12:01
① 怎样用java实现电子印章
/**
*Copyright(c)2003-2007WondersInformationCo.,Ltd.AllRightsReserved.
*5-6/F,20Bldg,481GuipingRD.Shanghai200233,PRC
*
*.
*(Research&DevelopmentCenter).Youshallnotdisclosesuch
*
*.
*
*.org
*/
packagecom.wonders.cop.billing.util;
importjava.awt.AlphaComposite;
importjava.awt.Color;
importjava.awt.Font;
importjava.awt.Graphics2D;
importjava.awt.Image;
importjava.awt.RenderingHints;
importjava.awt.image.BufferedImage;
importjava.io.File;
importjava.io.FileOutputStream;
importjava.io.InputStream;
importjava.io.OutputStream;
importjava.util.HashMap;
importjava.util.Iterator;
importjava.util.Map;
importjavax.imageio.ImageIO;
/**
*TODO(用一句话描述该文件做什么)
*
*@Title:ImageMarkLogUtil.java
*@Packagecom.wonders.cop.billing.util
*@ClassName:ImageMarkLogUtil
*@authorYaoHang
*@companyWondersInformationCo.,Ltd.
*@date2014年11月6日下午4:24:35
*@versionV1.0
*/
publicclassImageMarkLogoUtil{
//水印透明度
privatestaticfloatalpha=1f;
//水印横向位置
privatestaticintpositionWidth=82;
//水印纵向位置
=545;
//水印文字字体
privatestaticFontfont=newFont("宋体",Font.PLAIN,13);
//水印文字颜色
privatestaticColorcolor=Color.black;
publicstaticvoidmain(String[]args){
StringsrcImgPath="d:/888880002302900_web.jpg";
StringtargerTextPath="d:/qie_text.jpg";
ImageMarkLogoUtil
.markImageByTexts(testValue(),
BillDetailImagePosition.getPosition("888880002302900"),srcImgPath,
targerTextPath);
}
publicstaticMaptestValue(){
Map<String,String>value=newHashMap<String,String>();
value.put("feedPrice","15.1");
value.put("feedCount","20");
value.put("nowNum","124");
value.put("drainageCount","55");
value.put("drainagePrice","1.5");
value.put("feedCost","66");
value.put("cost","66");
value.put("drainageCost","100");
value.put("barcode","10101010101010101");
value.put("nextCopy","2014-12-10");
value.put("waterType","居民生活用水");
value.put("meterReader","测试人员");
value.put("Number","741sg");
value.put("prevCarryOver","0.25");
value.put("nowCarryOver","2.12");
value.put("openDate","20141002");
value.put("nextMonth","201402");
value.put("remark","您缴付的2013年03月30.80元水费,我公司已收到,谢谢!");
value.put("detailStatus","00");
value.put("billStatus","00");
value.put("prevMonth","201406");
value.put("lastPayDate","20140112");
value.put("companyName","市北水");
value.put("type","1");
value.put("amount","58.1");
value.put("address","浦秀路220弄10号101");
value.put("year","2014");
value.put("month","04");
value.put("billId","11111");
value.put("account","38445450");
value.put("companyId","888880002302900");
value.put("realName","姚航");
returnvalue;
}
/**
*给图片添加水印文字、可设置水印文字的旋转角度
*
*@paramlogoText
*@paramsrcImgPath
*@paramtargerPath
*@paramdegree
*/
(Map<String,String>value,
Map<String,String[]>position,StringsrcImgPath,StringtargerPath){
InputStreamis=null;
OutputStreamos=null;
try{
//1、源图片
ImagesrcImg=ImageIO.read(newFile(srcImgPath));
BufferedImagebuffImg=newBufferedImage(srcImg.getWidth(null),
srcImg.getHeight(null),BufferedImage.TYPE_INT_RGB);
//2、得到画笔对象
Iterator<String>positionIter=position.keySet().iterator();
Stringkey="";
Stringlogotext="";
String[]xy;
while(positionIter.hasNext()){
key=positionIter.next();
xy=position.get(key);
logotext=value.get(key);
System.out.println("key:"+key+",value:"+logotext);
if(xy!=null&&xy.length==2)
printText(srcImg,buffImg,logotext,
Integer.valueOf(xy[0]),Integer.valueOf(xy[1]));
}
//10、生成图片
os=newFileOutputStream(targerPath);
ImageIO.write(buffImg,"JPG",os);
System.out.println("图片完成添加水印文字");
}catch(Exceptione){
e.printStackTrace();
}finally{
try{
if(null!=is)
is.close();
}catch(Exceptione){
e.printStackTrace();
}
try{
if(null!=os)
os.close();
}catch(Exceptione){
e.printStackTrace();
}
}
}
/**
*在图片上打印文字
*
*@paramsrcImg
*@parambuffImg
*@paramlogoText
*@return
*/
privatestaticvoidprintText(ImagesrcImg,BufferedImagebuffImg,
StringlogoText,IntegerpositionX,IntegerPositionY){
Graphics2Dg=buffImg.createGraphics();
//3、设置对线段的锯齿状边缘处理
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g.drawImage(
srcImg.getScaledInstance(srcImg.getWidth(null),
srcImg.getHeight(null),Image.SCALE_SMOOTH),0,0,null);
//5、设置水印文字颜色
g.setColor(color);
//6、设置水印文字Font
g.setFont(font);
//7、设置水印文字透明度
g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP,
alpha));
//8、第一参数->设置的内容,后面两个参数->文字在图片上的坐标位置(x,y)
g.drawString(logoText,positionX,PositionY);
//9、释放资源
g.dispose();
}
}
② 求印章在线制作源码
镜像过去吧,就是楼上说的网站套网站,要是源码这么容易让你挖出来人家不用混了
③ 求在线书法字体生成网站源码
找公司开发吧,这种要求,应该没有现成的源码
④ 求印章大师8.0注册码 我的源码是J708GYE4 请推算 感谢
是
687B1A508E8A06895168
⑤ 金山电子印章系统的介绍
金山电子印章系统,自主知识产权、源码级安全设计,防篡改、防伪造、不可抵赖。
⑥ 有谁有印章系统的呀!我要的是源码
似乎,可以参考一下头像系统,asp。。
⑦ 谁有提供JAVA OA办公系统源码
中服软件的SaaS OA是目前功能最全,最实用的免费OA软件,具有多种特点:
1)界面自定义
2)印章自定义
3)功能根据需要自己选择组装
4)可以同时用多个oa系统
5)自己定义流程
6)拥有300多个功能
7)表单自定义
8)目前有10万用户正在免费使用
可查看源码
⑧ 怎样用JAVA实现电子印章
现成写好的印章生成小工具源码,还支持椭圆、私章等。直通车:https://github.com/localhost02/SealUtil
⑨ 求印章在线制作源码
昕友Web在线实时印章系统
⑩ Java或js实现动态生成椭圆电子章图片(非窗体程序)
这个真不好弄,要考虑输入的字,字符串的长度过长,计算每个字的宽度,还要考虑底图的大小,字体的整体旋转弧度,这个分不好拿,你自己慢慢弄吧!
热点内容