Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

£¨Àý£©JavaÉú³ÉPDFͼƬ iText

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.lowagie.text.Document;
import com.lowagie.text.Font;
import com.lowagie.text.Image;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;                                              import com.lowagie.text.pdf.PdfEncryption;
public class testIText extends HttpServlet {
 public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
     try{
     //ÉèÖÃͼƬ´óС Ò³ÃæΪA4
     Document document = new Document(PageSize.A4, 110, 110, 120, 140);
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     PdfWriter.getInstance(document, bos);
     //1£¬ÉèÖôËPDFÎļþµÄȨÏÞ£¬Ö»ÓÐдÉϵÄÊÇÔÊÐíµÄ¡£ÕâÀïÖ»ÔÊÐí´òÓ¡£¬¶ÁÈ¡ºÍ±£´æ£¬²»ÔÊÐíÐ޸ĵȡ£
     int intPermissions = PdfWriter.AllowPrinting |PdfWriter.AllowScreenReaders;  
      //2£¬ÈôҪʵÏÖÆäËûȨÏÞÈçÐÞ¸ÄµÈ ÔòÐèҪдÈëÃÜÂ룬ÕâÀïÊÇÉèÖÃÃÜÂë¼ÓÃܱê×¼»ò¼ÓÃÜÀàÐÍ¡£
      int intEncryptionType = PdfEncryption.STANDARD_ENCRYPTION_40;
      //3£¬ÒªÊÇÓÃÕâ¸ö·½·¨ÐèÒªÒýÈëÒ»¸öjar°ü£¨bcprov-jdk15-137.jar£©¡£µÚÒ»¸ö²ÎÊý£º´ò¿ªÊ±ÐèÒªµÄÃÜÂ룻µÚ¶þ¸ö²ÎÊý£ºÊµÓÃÆä


Ïà¹ØÎĵµ£º

javaÃæÊÔÎÊÌ⼯½õ

        ÎÒÃÇΪʲôҪȥÃæÊÔ ? ÃæÊÔµÄÄ¿µÄÊÇʲô ?
        ÃæÊÔÒª½â¾öÄļ¸¸öÎÊÌâ ?
 
Ò»¡¢ÃæÊÔµÄÄ¿µÄ
¶þ¡¢ÃæÊÔÇ°µÄ×¼±¸
Èý¡¢ÃæÊÔ³£¼ûÎÊÌâ½â´ð
      A¡¢ÏîÄ¿¾­Àí³£¼ûÎÊÌâ
     B ......

C++תJAVAÐèҪעÒâµÄ¼¸µã

ƪÎÄÕÂÊÇ×î½ü¸Õ¿´µ½µÄ£¬ËäÈ»ÊÇ˵³ÌÐòÔ±´ÓC++תJAVAÐèҪעÒâµÄµØ·½£¬µ«ÊǺÜÏêϸµÄ˵³öÁËC++ºÍJAVAµÄ²»Í¬µÄµØ·½£¬¶ÔÓÚJAVAÖÐΪʲôûÓÐÖ¸Õ롢ΪʲôûÓÐÄÚ´æй¶¡¢½Ó¿ÚºÍC++ÖжàÖؼ̳еĹØϵ¡¢Òì³£»úÖƵÈÎÊÌâÒ²ÃèÊöµÄºÜÏêϸ£¬¹ÊתÔعýÀ´¡£
1.JavaÔÚÐéÄâ»úÉÏÔËÐÐ
JavaÔ´´úÂë²¢²»ÊDZ»±àÒë³ÉΪÆÕͨµÄ»úÆ÷´úÂë¡£¶øÊDZ»·­Òë³ÉÎ ......

Java µ÷ÓÃEXE

ʹÓÃRuntime.getRuntime().exec()·½·¨¿ÉÒÔÔÚjava³ÌÐòÀïÔËÐÐÍⲿ³ÌÐò.  
  ¸Ã·½·¨ÓÐ6¸ö¿É·ÃÎÊ°æ±¾:  
  1.exec(String   command)  
  2.exec(String   command,   String   envp[],   File   dir)    
  3.exec(String   cmd, &n ......

java¶ÁÈ¡xmlÅäÖÃÎļþ

xmlÎļþÈçÏ ÅäÖù¦ÄÜ¿ª¹Ø
<Configurations>
    <Samples>true</Samples>
    <Excepts>true</Excepts>
    <CheckFace>false</CheckFace>
    <ThumbNail>false</ThumbNail>
  &nbs ......

java·½·¨´«ÖµºÍ´«ÒýÓÃ

ij֪ÃûÃÅ»§ÍøÕ¾µÄÒ»µÀ±ÊÊÔÌâ
public class Test {
public static void stringUpd(String str) {
str = str.replace("j", "l");
System.out.println(str);
}

public static void stringBufferUpd(StringBuffer bf) {
bf.append("c");
System.out.println(bf);
}

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ