0
私はdocxファイルからコンテンツを抽出するためにpoiを使用しています。 ファイルを処理すると、すべての画像が失われます。 私は、このファイルの形式をチェックし、構造が異常であることが判明:poxのdocxファイルの埋め込み段落内のコンテンツを抽出します
<w:r>
<w:p xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing">
<w:r>
<w:drawing>
<wp:anchor distT="0" distB="0" distL="114300" distR="114300" simplePos="0" relativeHeight="251658240" behindDoc="0" locked="0" layoutInCell="1" allowOverlap="1">
<wp:simplePos x="0" y="0"/>
<wp:positionH relativeFrom="column">
<wp:align>center</wp:align>
</wp:positionH>
<wp:positionV relativeFrom="paragraph">
<wp:posOffset>2540</wp:posOffset>
</wp:positionV>
<wp:extent cx="5352176" cy="1837188"/>
<wp:wrapTopAndBottom/>
<wp:docPr id="9" name="media/GIUACAFYtDB.png"/>
<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:nvPicPr>
<pic:cNvPr id="0" name="media/GIUACAFYtDB.png"/>
<pic:cNvPicPr/>
</pic:nvPicPr>
<pic:blipFill>
<a:blip r:embed="rId9"/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</pic:blipFill>
<pic:spPr>
<a:xfrm>
<a:off x="0" y="0"/>
<a:ext cx="5352176" cy="1837188"/>
</a:xfrm>
<a:prstGeom prst="rect"/>
</pic:spPr>
</pic:pic>
</a:graphicData>
</a:graphic>
</wp:anchor>
</w:drawing>
</w:r>
</w:p>
</w:r>
段落要素は、実行要素の内部にあります。私はそれを埋め込みパラグラフと呼び、poiを使って埋め込みパラグラフを解決する方法を見つけることができません。 このようなデータはどうすれば処理できますか?
https://brattahlid.wordpress.com/2012/05/08/is-docx-really-an-open-standard/ この芸術的な点では、Microsoft Wordはopenxmlを完全にサポートしていないと言います。しかしpoiはopenxmlスキーマに基づいています。マイクロソフトのdocxファイルを解決する他のソリューションはありますか? – TimYi