java²Ù×÷pdf£¨½â¾öÖÐÎĵ¼³öÎÊÌ⣩
Java iText ¶¯Ì¬ Éú³É PDF Îĵµ ±í¸ñ ÖÐÎÄÎÊÌâ
iTextÊÇÒ»¸ö¿ª·¢Ô´´úÂëµÄÏîÄ¿£¬Äã¿ÉÒÔʹÓÃiText·½±ãµÄʵÏÖPDFµÄÊä³ö¡£
Ò»¡¢iTextµÄÏÂÔØ£º
Äã¿ÉÒÔÔÚ http://www.lowagie.com/iText/ ²é¿´¹ØÓÚiTextµÄÏà¹ØÐÅÏ¢£¬°üÀ¨Ô´´úÂ룬Îĵµ..
1. itext-src-1.4.zip£¨Ô´´úÂ룩
http://jaist.dl.sourceforge.net/sourceforge/itext/itext-src-1.4.zip
2. itext-1.4.jar£¨¿ÉÒÔÖ±½Óµ¼ÈëµÄjarÎļþ£©
http://jaist.dl.sourceforge.net/sourceforge/itext/itext-1.4.jar
3. ÑÇÖÞÓïÑÔ°ü
http://itextdocs.lowagie.com/downloads/iTextAsian.jar £¨»òÕߣ©
http://itextdocs.lowagie.com/downloads/iTextAsianCmaps.jar
¶þ¡¢Ê¾Àý³ÌÐò£º
Ê×ÏÈ°ÑÉÏÃæµÄÕ⼸¸öjar°üµÄÍêÕû·¾¶Ìí¼Óµ½»·¾³±äÁ¿ classpath ÖУ¬È»ºóÔÙÏÂÃæµÄ³ÌÐò
Öе¼ÈëÏàÓ¦µÄ°ü
/**
* HelloWorld.java
*/
import java.io.FileOutputStream;
import java.io.IOException;
import com.lowagie.text.*;
import com.lowagie.text.pdf.PdfWriter;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
// ´´½¨Ò»¸öDocument¶ÔÏó
Document document = new Document();
try
{
// Éú³ÉÃûΪ HelloWorld.pdf µÄÎĵµ
PdfWriter.getInstance(document, new FileOutputStream("HelloWorld.pdf"));
// Ìí¼ÓPDFÎĵµµÄһЩÐÅÏ¢
document.addTitle("Hello World example");
document.addAuthor("Bruno Lowagie");
document.addSubject("This example explains how to add metadata.");
document.addKeywords("iText, Hello World, step 3, metadata");
document.addCreator("My program using iText");
// ´ò¿ªÎĵµ£¬½«ÒªÐ´ÈëÄÚÈÝ
document.open();
Ïà¹ØÎĵµ£º
Ò»¡¢Ïß³Ì
1 Ï̵߳Ĵ´½¨
´´½¨Ïß³Ìͨ³£ÓÐÁ½ÖÖ·½·¨: 1) À©Õ¹ThreadÀàʵÏÖÏ̵߳Ĵ´½¨ÊÇ×î³£ÓÃÒ²ÊÇ×îÖ±½ÓµÄÒ»ÖÖ·½·¨£¬Í¨¹ý¼Ì³ÐÀàThreadʵÏÖÏß³ÌÌ壻2) ͨ¹ýʵÏÖRunnable½Ó¿ÚʵÏÖÏß³ÌÌå¡£
2 ThreadÀàµÄ¼¸ÖÖ¹¹Ô캯Êý
1) Thread()
2) Thread(Runnable target)
3) T ......
C/C++
/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê4ÔÂ29ÈÕ, ÉÏÎç9:46
*/
#include <iostream>
using namespace std;
int maximum(int[], int);
int main(int argc, char** argv) {
// int sg[3][4] = {
int sg[][4] = {
{68, 77, 73, 86},
{87, 96, 7 ......
Ò»¸öÓÅÐãµÄJava³ÌÐòÔ±±ØÐëÁ˽âGCµÄ¹¤×÷ÔÀí¡¢ÈçºÎÓÅ»¯GCµÄÐÔÄÜ¡¢ÈçºÎÓëGC½øÐÐÓÐÏ޵Ľ»»¥£¬ÒòΪÓÐһЩӦÓóÌÐò¶ÔÐÔÄÜÒªÇó½Ï¸ß£¬ÀýÈçǶÈëʽϵͳ¡¢ÊµÊ±ÏµÍ³µÈ£¬Ö»ÓÐÈ«ÃæÌáÉýÄÚ´æµÄ¹ÜÀíЧÂÊ £¬²ÅÄÜÌá¸ßÕû¸öÓ¦ÓóÌÐòµÄÐÔÄÜ¡£±¾ÆªÎÄÕÂÊ×Ïȼòµ¥½éÉÜGCµÄ¹¤×÷ÔÀíÖ®ºó£¬È»ºóÔÙ¶ÔGCµÄ¼¸¸ö¹Ø¼üÎÊÌâ½øÐÐÉîÈë̽ÌÖ£¬×îºóÌá³öһЩJava³ÌÐòÉ ......
¡¡1.Ê×ÏÈÊǹ¤¾ß±ÈÈçEclipseºÜ·½±ãÁË¡£
¡¡¡¡2.ÓÃwinrarÖ®ÀàµÄ¹¤¾ß£¬°Ñweb-infoĿ¼£¬¼°¸úËüͬ¼¶µÄËùÓÐĿ¼¼°Îļþ£¬´ò°ü³É zipÎļþ¾ÍÐÐÁË£¬È»ºó°ÑÀ©Õ¹Ãû¸Ä³Éwar!
¡¡¡¡3 JarÃüÁ
¡¡¡¡¼Ù¶¨ÓÐÒ»¸öWebÓ¦ÓãºC:\myHome
¡¡¡¡ myHome/WEB-INF/……
¡¡¡¡myHome/files/……
¡¡¡¡myHome/image/… ......
ÊÂʵÉÏÍøÂç±à³Ì¼òµ¥µÄÀí½â¾ÍÊÇÁ½Ì¨¼ÆËã»úÏ໥ͨѶÊý¾Ý¶øÒÑ¡£¶ÔÓÚ³ÌÐòÔ±¶øÑÔ£¬È¥ÕÆÎÕÒ»ÖÖ±à³Ì½Ó¿Ú²¢Ê¹ÓÃÒ»ÖÖ±à³ÌÄ£ÐÍÏà¶Ô¾Í»áÏԵüòµ¥µÄ¶àÁË¡£Java SDKÌṩһЩÏà¶Ô¼òµ¥µÄApiÀ´Íê³ÉÕâЩ¹¤×÷£¬Socket¾ÍÊÇÆäÖÐÖ®Ò»¡£
¶ÔÓÚJava¶øÑÔ¡£ÕâЩApi´æÔÚÓëJava.netÕâ¸ö°üÀïÃæ¡£Òò´ËÖ»Òªµ¼ÈëÕâ¸ö°ü¾Í¿ÉÒÔ×¼±¸ÍøÂç±à³ÌÁË¡£ÍøÂç± ......