Bug 65509 - Neither all image are shown in ​Word for Mac/Windows from word file created with Apache POI
Summary: Neither all image are shown in ​Word for Mac/Windows from word file created ...
Status: NEEDINFO
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 5.0.0-FINAL
Hardware: PC All
: P4 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-19 00:37 UTC by Roberto
Modified: 2021-10-03 13:31 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto 2021-08-19 00:37:32 UTC
*Description:*

Using apache POI (org.apache.poi:poi-ooxml:5.0.0), load the "template.docx"(1) file (it has some images in the header), adds some images and save it creating a new file. Open the created file in Word for Mac or Word for Windows. Notice neither all added images are shown.


*Expected behavior:*

Show all images add to the document.


*How to reproduce*

This project to demonstrate the issue https://github.com/betorcs/poi-bug-missing-image



*Resources*

(1) "template.docx" (https://github.com/betorcs/poi-bug-missing-image/blob/master/src/main/resources/template.docx?raw=true)
Comment 1 Sayi 2021-09-01 07:42:10 UTC
Hi,
I cannot reproduce your problem. The jdk version is 16, and the microsoft word for Mac version is 16.39. All pictures will be displayed normally.

You can attach the generated document.
Comment 2 Roberto 2021-09-01 11:44:46 UTC
Hi @Sayi,

Thanks for your reply, I added the generated docx in github project, you can find it here: https://github.com/betorcs/poi-bug-missing-image/blob/master/assets/generated-report.docx?raw=true
Comment 3 Sayi 2021-09-02 02:23:06 UTC
(In reply to Roberto from comment #2)
> Hi @Sayi,
> 
> Thanks for your reply, I added the generated docx in github project, you can
> find it here:
> https://github.com/betorcs/poi-bug-missing-image/blob/master/assets/
> generated-report.docx?raw=true

I opened your document in my Microsoft Word for Mac (16.39 (20071300)), the picture will still be displayed normally.

Using Libreoffice67.2 for mac will also display normally.
Comment 4 Roberto 2021-09-02 23:39:05 UTC
Yeah I tested with same version you and worked for me, would you say it's MS Word bug?
Comment 5 Sayi 2021-09-03 06:39:32 UTC
Possibly, but I am not very clear.

At least all of my word processing software can not reproduce this problem.