ÔÚjavaÖÐʹÓÃiText²ð·ÖPDFÎļþ
ʹÓÃiTextÀ´²ð·ÖpdfÎļþÏà±ÈPDFBOXÒª¸´ÔÓÒ»µã¡£ÒÔÏÂʾÀýʵÏÖÁ˲ð·ÖPDFÎļþΪµ¥Ò³Îļþ£¬²¢±£´æΪ“ÎļþÃû-n.pdf”µÄÎļþ£º
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.pdf.PdfCopy;
import com.itextpdf.text.pdf.PdfReader;
/**
* PDFÎĵµµÄ¹¤¾ß
*
* @author Howard
*
*/
public class PDFTool {
/**
* ²ð·Öpdf,·µ»ØÒ³Êý
*
* @throws IOException
* @throws DocumentException
* @throws FileFormatException
* @throws FileNotFoundException
*
*/
public int split(String filePath) throws IOException, DocumentException {
PdfReader reader = new PdfReader(filePath);
int pageCnt = reader.getNumberOfPages();
for (int i = 0; i < pageCnt; i++) {
Document document = new Document(reader.getPageSizeWithRotation(i+1));
PdfCopy copy = new PdfCopy(document, new FileOutputStream(filePath
.substring(0, filePath.length() - 4)
+ "-" + (i + 1) + ".pdf"));
document.open();
copy.addPage(copy.getImportedPage(reader, i+1));
document.close();
}
return pageCnt;
}
}
ʹÓõÄiText´¦ÀípdfÏà±ÈPDFBOXµÄºÃ´¦ÊÇ£¬Ä¿Ç°ÓÐЩpdfÔÚʹÓÃPDFBOX¶Áȡʱ¾Í»á±¨´í£¬µ«ÔÚiTextÖÐÈ´²»»á£¬¾ßÌåÔÒò»¹Óдý·ÖÎö¡£
ÒòΪÕâ¸ö´íÎóÒ²³¢ÊÔ¹ýÓÓPDFClown”£¬Í¬ÑùÒ²»á±¨´í¡£
Ïà¹ØÎĵµ£º
Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......
Õ»Óë¶Ñ¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄ¶ÔÏó´ÓÖзÖÅä¿Õ¼ä¡£ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬ËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµÄÊÍ·Å¡£
......
0¡¡ÒýÑÔ
´Ó¿ØÖÆ̨ÖжÁÈ¡Êý¾ÝÊÇÒ»¸ö±È½Ï³£ÓõŦÄÜ£¬ÔÚ JDK 5.0 ÒÔÇ°µÄ°æ±¾ÖеÄʵÏÖÊDZȽϸ´Ôӵģ¬ÐèÒªÊÖ¹¤´¦ÀíϵͳµÄÊäÈëÁ÷¡£ÓÐÒâ˼µÄÊÇ£¬´Ó JDK 5.0 °æ±¾¿ªÊ¼£¬ÄÜ´Ó¿ØÖÆ̨ÖÐÊäÈëÊý¾ÝµÄ·½·¨Ã¿Ôö¼ÓÒ»¸ö°æ±¾ºÅ£¬¾ÍÓÐÒ»ÖÖÐÂÔöµÄ·½·¨£¬ÕâÒ²Ôö¼ÓÁËÑ¡ÔñµÄÖÖÀ࣬¿ÉÒÔÒÀ¾Ý²»Í¬µÄÒªÇóÀ´½øÐÐÑ¡Ôñ¡£ÏÂÃæÀ´¿´Ò»Ï ......
¿´»ðÁú¹ûдÁËÒ»¸öÑéÖ¤ÈÕÆÚµÄJavaÕýÔò±í´ïʽ£¬¾Í¸øתÁ˹ýÀ´
ÓÉÓÚʹÓõ½ÁË·´ÏòÔ¤ËÑË÷ģʽ“(?<=)”ºÍ“(?<!)”£¬ËùÒÔÕâ¸öÖ»ÄÜÔÚ Java ÖÐʹÓ㬲»ÄÜÔÚ JavaScript ÖÐʹÓã¬JavaScript ²»Ö§³Ö·´ÏòÔ¤ËÑË÷¡£Ö§³Ö yyyy-MM-dd¡¢yyy-MM-dd¡¢yy-MM-dd ºÍ y-MM-dd£¬¼´Äê·ÝΪ 1¡«4 ......
¶ÔÓÚ¶àÏ̳߳ÌÐòÀ´Ëµ£¬²»¹ÜÈκαà³ÌÓïÑÔ£¬Éú²úÕߺÍÏû·ÑÕßÄ£ÐͶ¼ÊÇ×î¾µäµÄ¡£¾ÍÏñѧϰÿһÃűà³ÌÓïÑÔÒ»Ñù£¬Hello World!¶¼ÊÇ×î¾µäµÄÀý×Ó¡£
¡¡¡¡Êµ¼ÊÉÏ£¬×¼È·ËµÓ¦¸ÃÊÇ“Éú²úÕß-Ïû·ÑÕß-²Ö´¢”Ä£ÐÍ£¬À뿪Á˲ִ¢£¬Éú²úÕßÏû·ÑÕßÄ£Ð;ÍÏÔµÃûÓÐ˵·þÁ¦ÁË¡£
¡¡¡¡¶ÔÓÚ´ËÄ£ÐÍ£¬Ó¦¸ÃÃ÷ȷһϼ¸µã£º
¡¡¡¡1¡¢Éú²úÕß½ö½öÔÚ²Ö´ ......