Remove AltChunk Referenced File from OOXML Word DOCX Document using C# .NET

I’m using Aspose Words to load a OOXML (Open Office) docx file, which contains a altchunk document, but it’s not a friend. The altchunk is the same as the document.xml, so the output is rendered twice. Therefore my thoughts are, to not render or remove the altchunk document or reference before continuing - is that possible?

Viewing the docx file as zip file:
1.png (41.4 KB)

Viewing the document.xml file, where it “includes” the altchunk (which includes the same content):
2.PNG (98.1 KB)

I’ve searched what I could on Google and on this forum, but couldn’t seem to find any way to remove it or exclude it with Aspose.Words, before continuing the processing/rendering.

@Michael_Koll,

We have logged your requirement in our issue tracking system. Your ticket number is WORDSNET-22295. We will further look into the details of this requirement and will keep you updated on the status.

Please also ZIP and attach your sample OOXML (Open Office) DOCX file containing the AltChunk document here for our reference.

Attached is a simple example, where there’s an AltChunk file inside, which causes the issue as it’s the same as the document.xml, so it would be nice to be able to remove that element.

230139.docx.zip (13.0 KB)

I found a temporary solution, to open and manipulate the document using OpenXML before using it with Aspose Words. Not pretty, but works. I don’t know if it’s just me having some bad files, but in my case it would have been nice to be able to remove or not use the AltChunk part in Aspose Words.

@Michael_Koll,

We have logged these details in our issue tracking system and will keep you posted here on any further updates.

A post was split to a new topic: Ability to Directly Edit OpenXML