Apache poi: remove Picture in XWPFDocument

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 02:25:31

问题


I'm writing an application that takes a .docx file with a bunch of empty paragraphs and tables and fills them programmatically using Apache POI with data from a db.

The .docx model I've been provided with also has a serie of pictures in it: my problem is I'd like to remove the ones I don't need (again, programmatically). I see there is a method for adding pictures to a XWPFRun (addPicture()) but not one for removing them.

Can this be done? How do you remove a picture from a .docx file with POI?

Thanks in advance!!

来源:https://stackoverflow.com/questions/23789739/apache-poi-remove-picture-in-xwpfdocument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!