StructuredDocumentTag are missing if they contain section breaks

Hi,

while working at our Software and the modules for DocumentHandling. I run in trouble with StructuredDocumentTags. We want to use StructuredDocumentTags for allow the user to edit spezial areas of the document. These parts we save separate as RTF. To protect these areas from deletion and because of the smart GUI for labeling in MS Word we want to use StructuredDocumentTags.

RTF could also include sections and StructuredDocumentTag are for RTF. But I could not add sections to my blocklevel SDT. I run into an IllegalArgumentException. While trying the other way around to see the diffenerences between the Word an the Aspose Document. I found, that I could not extract SDT from the document-tree if the document contains any section break in the docx.

I appended a testdocument create with MS Word if I run the following code:

try {
Document doc = new Document(path +“Lorem_UCC.docx”);

NodeCollection sdt = doc.getChildNodes(NodeType.STRUCTURED_DOCUMENT_TAG, true);

for (StructuredDocumentTag structuredDocumentTag : sdts) {
System.out.println("ID " + structuredDocumentTag.getId());
System.out.println("Level " + structuredDocumentTag.getLevel());
}
} catch (Exception e){
e.printStackTrace();
}

I only see one of the three inserted SDTs. There is no Exception thrown. What could I do to not loose my SDT which I inserted to ensure there are not missing while editing, so the content could extracted when re-saving the whole document after the user edited in MS Word?

Thank you.

Hi Babett,


Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same problem on my side i.e. not all of the StructuredDocumentTags are preserved during open/save with Aspose.Words. For the sake of correction, I have logged this problem as WORDSNET-7150 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Best Regards,

Hi,


We are also experiencing the same issue. Is there any update on the state of the fix for this.

We are using Aspose Words 14.9.

Thanks

Alastair

Hi Alastair,


Thanks for your inquiry. Regarding WORDSNET-7150, our development team has completed the analysis of this issue and the root cause has been identified. However, the implementation of the fix of this issue has been postponed till a later date. We will inform you via this thread as soon as this is resolved. We apologize for any inconvenience.

Best regards,

Hi,


This is becoming a major issue for us. Is there any update on this issue and can we push it up the priority for fixing?

Thanks

Alastair
Hi Alastair,

Thanks for being patient. Regarding WORDSNET-7150, our product team has completed the work on your issue and has come to a conclusion that they won't be able to implement the fix to your issue. Your issue (WORDSNET-7150) is now closed with 'Won't Fix' resolution. There are SDT with Section Breaks inside and because of this the requested feature is not compatible with Aspose.Words document model. We apologize for your inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-7150) have been fixed in this Aspose.Words for .NET 20.7 update and this Aspose.Words for Java 20.7 update.