how to add a picture to a .docx document with Apache POI XWPF in java

前端 未结 6 627
小蘑菇
小蘑菇 2020-11-30 08:32

I\'ve created a simple docx-Document, using Java POI 3.7. XWPF. Then, I added a picture by using the Method XWPFDocument.addpicture(byte[] arg0, int arg1).

6条回答
  •  天命终不由人
    2020-11-30 08:41

    The bug link that you've provided actually has a working solution: https://issues.apache.org/bugzilla/show_bug.cgi?id=49765#c15

    It requires some amount of hackery but I'm using it and it certainly works!

提交回复
热议问题