ÇѱÛ(HWP) JAVA ¶óÀ̺귯¸® °³¹ßÇØ ºÃ½À´Ï´Ù.
¾È³çÇϼ¼¿ä..
Á¦°¡ 3°³¿ù µ¿¾È °³¹ßÇÑ ÇѱÛ(HWP) ¶óÀ̺귯¸®¸¦ GitHub¿¡ ¿Ã·È½À´Ï´Ù.
https://github.com/neolord0/hwplib
¾ÆÁ÷Àº Àб⠸ðµâ ¹Û¿¡ ±¸ÇöµÇÁö ¾Ê¾ÒÀ¸³ª, ÇÑ±Û ÆÄÀÏ ±¸Á¶¿¡ °ü½ÉÀÌ ÀÖÀ¸½Å ºÐµéÀº ¹Þ¾Æº¸±æ ¹Ù¶ø´Ï´Ù.
±Ã±ÝÇÑ Á¡À̳ª ¹ö±× µîµîÀº À̽´·Î µî·ÏÇØ Áֽøé.. ´äº¯ÇØ µå¸®°Ú½À´Ï´Ù.
hwplib
Çѱ۰ú ÄÄÇ»ÅÍ(ÇÑÄÄ)¿¡¼ ¸¸µç ¿öµåÇÁ·Î¼¼¼ "ÇѱÛ"ÀÇ ÆÄÀÏ¿¡ ´ëÇÑ ¶óÀ̺귯¸®ÀÔ´Ï´Ù.
º» ¶óÀ̺귯¸®´Â JAVA·Î ±¸ÇöµÇ¾úÀ¸¸ç, ÇÑ±Û ÆÄÀÏÀÇ ÇϺΠ±¸Á¶ÀÎ Microsoft Compound FileÀÇ Àб⠺κÐÀº Apache-POIÀÇ POIFS File SystemÀ» »ç¿ëÇÏ¿© ó¸®ÇÕ´Ï´Ù. º» ¶óÀ̺귯¸®´Â Çѱ۰úÄÄÇ»ÅÍÀÇ ÇÑ±Û ¹®¼ ÆÄÀÏ(.hwp) °ø°³ ¹®¼¸¦ Âü°íÇÏ¿© °³¹ßÇÏ¿´½À´Ï´Ù. ÇÑÄÄ¿¡¼ Á¦°øÇÏ´Â ¹®¼(HWP 5.0)´Â ¾Æ·¡URL¿¡¼ ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù.
http://www.hancom.com/etc/hwpDownload.do?gnb0=269&gnb1=271&gnb0=101&gnb1=140
2017.1.6
ÅؽºÆ® ÃßÃâ±â ¸ðµâÀ» Ãß°¡ÇÏ¿´½À´Ï´Ù.
HWPFile hwpFile = HWPReader.fromFile(filename);
String hwpText = TextExtractor.extract(hwpFile, TextExtractMethod.InsertControlTextBetweenParagraphText);TextExtractor.extract()ÀÇ µÎ¹ø° ÆĶó¹ÌÅÍ °ª¿¡ µû¶ó ¼¼°¡Áö ÃßÃâ ¹æ¹ýÀ» ±¸ÇöÇß½À´Ï´Ù.
OnlyMainParagraph // ¸ÞÀÎ ¹®´Ü¿¡ Æ÷ÇÔµÈ ÅؽºÆ®¸¸ ÃßÃâÇÔ
InsertControlTextBetweenParagraphText // ÄÁÆ®·ÑÀÇ ÅؽºÆ®¸¦ ¹®´Ü ÅؽºÆ® »çÀÌ¿¡ »ðÀÔÇÏ¿© ÃßÃâÇÔ
AppendControlTextAfterParagraphText // ÄÁÆ®·ÑÀÇ ÅؽºÆ®¸¦ ¹®´Ü ÅؽºÆ® µÚ¿¡ Ãß°¡ÇÏ¿© ÃßÃâÇÔÀб⠸ðµâ¿¡¼ ¹ö±× ¼öÁ¤ÇÏ¿´½À´Ï´Ù.
¼Ò½º ÀÎÄÚµùÀ» euc-kr¿¡¼ utf-8·Î º¯°æÇÏ¿´½À´Ï´Ù.
2016.12.23
ÀÌ ¹ø ¹èÆ÷¹öÀüÀº Àб⠸ðµâ ±îÁö¸¸ ±¸ÇöµÇ¾ú½À´Ï´Ù. ¾²±â ¸ðµâÀº ÃßÈÄ »óȲÀ» ºÁ¼ ±¸ÇöÇÒ °èȹÀÔ´Ï´Ù.
»ç¿ë¹ýÀºHWPFile hwpFile = HWPReader.fromFile(filename); // ÆÄÀÏÀ» Àд´Ù.
Section s = hwpFile.getBodyText().getSectionList().get(0); // ÆÄÀÏ¿¡¼ ù¹ø° ±¸¿ªÀ» ¾ò´Â´Ù.
Paragraph p = s.getParagraphList().get(0); // ù¹ø° ±¸¿ª¿¡¼ ù¹ø° ¹®´ÜÀ» ¾ò´Â´Ù.
...ÀÔ´Ï´Ù.
°¢°¢ÀÇ °´Ã¼µé°ú °´Ã¼¿¡ Æ÷ÇÔµÈ ¸Þ¼Ò½ºµé¿¡ ´ëÇؼ± "/doc" µð·ºÅ丮¿¡ ÀÖ´Â javadoc ¹®¼¸¦ Âü°íÇϽñ⠹ٶø´Ï´Ù.