.docx
我已经获取了从链接https://code.google.com/p/zkpoi/source/browse/branches/zkpoi/src/ooxml/java/org/apache/poi/xwpf/usermodel获取文件图片的代码/XWPFDocument.java?r=34
但我得到错误
对于 (POIXMLDocumentPart poixmlDocumentPart : getRelations()) getRelations() 未定义。
public List<XWPFPictureData> getAllPictures()
{
List<XWPFPictureData> pictures;
if (pictures == null)
{
pictures = new ArrayList<XWPFPictureData>();
for (POIXMLDocumentPart poixmlDocumentPart : getRelations())
{
if (poixmlDocumentPart instanceof XWPFPictureData)
{
pictures.add((XWPFPictureData) poixmlDocumentPart);
}
}
}
return pictures;
}
我使用poi-3.9 jar
和po-ooxml-3.9 jar
。请帮我纠正错误。我使用这个代码片段来删除使用java的.docx
文件图片。xwpfdocument