dotnet / dotnet/Open-XML-SDK

Image not shown correctly after removing some other images from Table via removal of Rows

Open
#935 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.6k
Forks
605
PR merge metrics
No merged PRs in 30d

Description

This issue is a:
- [x] Issue with the OpenXml library
- [ ] Question on library usage

**Description**

Related stackoverflow question: [here](https://stackoverflow.com/questions/67313699/open-xml-removal-of-ms-word-table-rows-corrupting-images). However when the process document is uploaded to SharePoint Online and if viewed in "Edit" mode the images are shown correctly but view mode again corrupts the images inside the table.

Table before removal of rows:
![image](https://user-images.githubusercontent.com/2231923/118460661-7b9a7c80-b72f-11eb-89e1-9a57efae3233.png)

Table after removal of rows and in SharePoint Online "Edit mode":
![image](https://user-images.githubusercontent.com/2231923/118460997-c6b48f80-b72f-11eb-8598-14c7c49247a4.png)

Table after removal of rows and in SharePoint Online "View mode" / After downloading the file:
![image](https://user-images.githubusercontent.com/2231923/118461093-e21f9a80-b72f-11eb-9805-5a2a8fa50926.png)

As shown in the last image, the images are missing however, upon inspection using OpenXML Productivity tool, it was confirmed that the imageParts in the processed document is continued to persist.

Can anyone please explain why does this happen? And how to solve this problem?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.