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,
Hi,
Hi Alastair,
Hi,
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.