From 64cdc2422e91702d4be515116e0b87e5bf008a3f Mon Sep 17 00:00:00 2001 From: albert <790321193@qq.com> Date: Wed, 20 Sep 2017 13:40:23 +0800 Subject: [PATCH] =?UTF-8?q?ms=20office=20=E8=BD=AC=E6=8D=A2=E6=88=90html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 8196 -> 8196 bytes WebContent/.DS_Store | Bin 6148 -> 6148 bytes WebContent/WEB-INF/.DS_Store | Bin 6148 -> 8196 bytes .../WEB-INF/lib/poi-ooxml-3.8-20120326.jar | Bin 933010 -> 933479 bytes src/com/albert/test/Test.java | 25 ++++++++++++++++++ .../poi/hwpf/converter/DocConverter.java | 8 +++--- .../poi/xwpf/converter/DocxConverter.java | 6 +---- 7 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 src/com/albert/test/Test.java diff --git a/.DS_Store b/.DS_Store index 03b43c09b30aecb16b1c27a01d7ce88bef328736..60c5c915fd8509531b2a5a431285a0e5eec5d65c 100644 GIT binary patch delta 25 gcmZp1XmQwZUYNtw&{9Xi(A;?PZ9&=1UxWpC0B&Un8vpRwjQ@07z#BBLDyZ diff --git a/WebContent/WEB-INF/.DS_Store b/WebContent/WEB-INF/.DS_Store index b218553ab0b1c865730f2dfa0429870e32288611..dc30cab1fcd2b96078f03f6a9c36a753932848e6 100644 GIT binary patch literal 8196 zcmeHMU2GIp6u#fKg&7&>v{qWw&2FvG1{Z0iKR}f(Z9$-ITInyeT6TAac4RtJc4oIg zEvX?!O)wf`{C&Wms1Ljt1>f-R3Dg&36C=b2e_o7<;)9yh7tftLTWCx52}8o%uR6@QcpCo8LbH!|=ynrs z#%WHZ2fdM@=}EueW83CjKauP+^oe1$q{X(}gkkCFtK5hB4NJ2pn(d6GIbNKuggZ)e zy@iI=vdPI!4Rx_-O+(#OEIQfHP#ufbZmOS}lBCkLH4p4QFn09Ve=D%U z1sT42B|X#0wusLYp_$~kNbllYdbg}lR)+VqwRb3;14hcWx{YJ{uv+L)zPoAImDaPA zO@GQZGh>!BtQMsbW-4PQTz$J~a%a*NI;pg6nq9VIxQ1=*8*ud_ZZ6O~)4+bmPP;8$ zuwhlrIQm|lVi{Szl_FB8V!m4EI1l6W>1l^#MZ8)hC!bzb8o9e_!+j0+$9K#Wszt?0 ziL$ysYdA*I)O#lk%^lsBa8kOZ8P>>tdOntG95nQ_T!fh1Vg&nrWBWj){Tpq5Jq(QE4N$b=KwX!}OlhuUO z;}AL`#73n?Rvo$L5IuY`wN|N@R88(R6G`0^sx3;Rq_)ZZS&_C-mMBe5&I_?cSrb z-0)2Qb`_`httGduE{(2Tzp-}9w&pn!EO_o$^UtH4;FQO;9GARDJ)gj0A1IMtqNILg zsqLUH=UYdb;ojwUMItIEo*1sHq+y6Qh8W%xizsRy(O&kPt80{qT0jgJ*1CE{QS)gF z2jd$=a-oyL& zfGB*92>b~?#b-p}8GMHy77(^QM^z#5;}ybYyVI6wTO*{&(R;pgFuEQHF@v7W9cAffIxu24T1pjTf1AE>BlVf^5u8!DAfa0dEtK3LV8oE;VxY7UB^kz{b5M` csBeq=a#~2TQ2F0K1O(@QaQ=JDySbZx0HIAJc>n+a delta 138 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{MGjdEU6q~50$jCG?VE1GL8J5ZX0@FB*%uRI^ zj7&`?uNCmvJVC6Sabv@5mc{HG9D>Y1JwPD94J2Ga+BX({XP(S2W2pcVW@KPsg3>G? R8pr`z1hSi9b3D%+W&pxl73cr} diff --git a/WebContent/WEB-INF/lib/poi-ooxml-3.8-20120326.jar b/WebContent/WEB-INF/lib/poi-ooxml-3.8-20120326.jar index 9175c16d95b8caa9f3d7c01e808ce882794715b4..ca21f55358c1afc7dc624958c70dcc75bc582da1 100755 GIT binary patch delta 9950 zcmZvCWlSAl(k5}kzjhM5dX{J)zi3hk*JY7D?^U5e%4d|wxNDkEI;fqC7DM!|Bq2l zOGnC`b+7QWd#qCRX)1ebE6V4PG|~ynmj|Vl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;p^QlO!`WUkP_{8f4*XgDHme`gtjD zlXMb;rgRLf^M4YnyM}HwcK-p;*L_2gk|dVu>_YMJaLhr8|CZ?28Buc2) zR&u4OvMik4Se$Jl=aXIPEH{**pcNXrUx|EDMMfjxs*x#=rtzy0=Gy%N#>0n{=uI5{+=to?MZ&R0*>?pg*q?~GC7rOj z_I>aypfeQE`4+yx;Fc>4!t31OevTh(WC{L87HrA&e7YEYLK1x99=cR;c{6B+HbB8q zpfVPB-7y`3 zUPiyW1j!)BF3dMLht4SejvO zIzio!R=T?PMDdGDe(`mr8e;hYe96a`W=iWA2A)$+&liHtC7PbrP`BdkWyOz{MdOL* zqS^|ihQIPH{k7yfrP1VEV(}wa`-aE!P?#&8@$*Jqx2%X+n<$G?WlBf4JkDV&?=BSa zBt#>R&WPqbe>^^?JU+jdWOTzAEb)A(^)Md8!^cw;nS$9V; zPf0jzGLJ@LyMTZBrv!MB2}i72>QB+HtJtoe#P}xpvvhLS=2%wJXhJaTLMcNq%2Smj zMW`8c9sgLD~5?TW|mJjtPt%pYT@J%sm_Z69ysA3lKevXl4zaHY+$9Ivsw06bVAhcOQTEl4vzIc z-#(LvC_k!BvOk*%+Yk@e4Pv~@5DGR462?BoZK+FWdFDF_;vfA7+isU(Y-HwFrad1( z=2v|m!Q^KjOKETPl5{alqfIWs#&>z}7j!TkPodF0CHEcqw)_+ZjW7xii$*hDyezqy za)%oVy;}?QTfG&1Y274VYl#&&gmOdi6$-QgciQ?T1aAofNtGEnaR|txT3fb*=Os90irGKc!m)@`d@vTBGki5_|8aQm z6krwHb3jvIrnr99r?|;TYQCjISn;%^;1)aiyc+Z*(;g?d(Xooje0KCKI~^r3{LGRBf1pRvc*~aRmqbAZzP8hNxmN&&#;O1R&W?-Yy+@ul&p?*I10z3%WJpQi(O?BN|0f6he~0;BD!wPk diff --git a/src/com/albert/test/Test.java b/src/com/albert/test/Test.java new file mode 100644 index 0000000..f3ff669 --- /dev/null +++ b/src/com/albert/test/Test.java @@ -0,0 +1,25 @@ +/** + * + */ +package com.albert.test; + +import org.apache.poi.xwpf.converter.DocxConverter; + +/** +* @ClassName: Test +* @Description: +* @author albert +* @date 2017年9月19日 下午4:56:28 +* +*/ +public class Test { + + /** + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception { + DocxConverter.convert("/Users/albert/Desktop/test.docx", "/Users/albert/Desktop/test.html"); + } + +} diff --git a/src/org/apache/poi/hwpf/converter/DocConverter.java b/src/org/apache/poi/hwpf/converter/DocConverter.java index f1fca8e..8396a78 100755 --- a/src/org/apache/poi/hwpf/converter/DocConverter.java +++ b/src/org/apache/poi/hwpf/converter/DocConverter.java @@ -806,12 +806,12 @@ protected void processImage(Element parent, CharacterRun cr ){ try { // TWIPS_PER_INCH/ - out = new FileOutputStream(new File(output.concat(File.separator).concat(fileName))); + File f= new File(output.concat(File.separator).concat(fileName)); + out = new FileOutputStream(f); pic.writeImageContent(out); Element img = htmlDocumentFacade.getDocument().createElement("img"); - String[] arr = output.split("/"); - String uri = arr[arr.length-3].concat(File.separator).concat(arr[arr.length-2]).concat(File.separator).concat(arr[arr.length-1]).concat(File.separator).concat(fileName); - img.setAttribute("src",uri ); + String uri = f.getParent().replace(f.getParentFile().getParentFile().getParentFile().getParentFile().getPath(), "").concat(File.separator).concat(fileName); + img.setAttribute("src",uri.substring(1) ); if(pic.getWidth() > 600) img.setAttribute("style", "width: 600px;"); Element imgBlock = htmlDocumentFacade.createBlock(); diff --git a/src/org/apache/poi/xwpf/converter/DocxConverter.java b/src/org/apache/poi/xwpf/converter/DocxConverter.java index 984d0d3..5ad21e1 100755 --- a/src/org/apache/poi/xwpf/converter/DocxConverter.java +++ b/src/org/apache/poi/xwpf/converter/DocxConverter.java @@ -93,16 +93,13 @@ public DocxConverter( String filePath, String output) throws IOException, Invali Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); StringUtil.getFilePath(""); - {// create image folder int pos = output.lastIndexOf("."); imgFolderPath = output.substring(0, pos).concat(File.separator).concat(IMG_FOLDER); File folder = new File(imgFolderPath); if(!folder.canRead()) folder.mkdirs(); - folder = null; - } - imgPath = StringUtil.getFileName(filePath, false).concat(File.separator).concat(IMG_FOLDER); + imgPath = folder.getParent().replace(folder.getParentFile().getParentFile().getParentFile().getParentFile().getPath(), "").concat(File.separator).concat(IMG_FOLDER); OPCPackage container = OPCPackage.open(filePath); @@ -327,7 +324,6 @@ private void processParagraphMulti(XWPFParagraph paragraph, Element page, boole } private void processRun(Element container, XWPFRun r) throws IOException { - List pics = r.getEmbeddedPictures(); if(!pics.isEmpty()){ processImage( container, pics);