印章源碼
發布時間: 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實現動態生成橢圓電子章圖片(非窗體程序)
這個真不好弄,要考慮輸入的字,字元串的長度過長,計算每個字的寬度,還要考慮底圖的大小,字體的整體旋轉弧度,這個分不好拿,你自己慢慢弄吧!
熱點內容