Issue while extracting html from word document

Hi Team,

I am facing issue while converting word to html. Extracted html does not contain information (tag id , tag name) for some content controls. I have attached the document. The extracted html contains '"-aw-sdt-tag:‘BASIC__1001__1617__206__206’ for only one tag , whereas document has other 4 tags also. Please check and help.

Code :

public static void main(String... args) throws Exception {
        com.aspose.words.License license = new com.aspose.words.License();
        license.setLicense("/home/saurabharora/Downloads/Aspose.Total.Product.Family.lic");
        Document doc = new Document("/home/saurabharora/Downloads/CL05693-null-2023-10-26.docx");
        HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.HTML);
        opts.setHtmlVersion(HtmlVersion.HTML_5);
        opts.setExportImagesAsBase64(true);
        opts.setExportPageMargins(true);
        opts.setUpdateSdtContent(true);
        String documentHTml = doc.toString(opts);
        System.out.println(documentHTml);
    }

Doc_html.zip (16.2 KB)

Extracted html :

<head><meta charset="utf-8" /><meta name="generator" content="Aspose.Words for Java 22.2.0" /><title></title></head><body style="font-family:'Times New Roman'; font-size:12pt"><div class="Section1"><div style="-aw-headerfooter-type:header-primary; clear:both"><p style="margin-top:0pt; margin-bottom:0pt"><span style="-aw-import:ignore">&#xa0;</span></p></div><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri">According to Hindu mythology, Parashurama was born to the sage Jamadagni and his Kshatriya wife, Renuka. In local tradition, it is believed they lived in a hut located at Janapav.[8] They had a celestial cow called Surabhi, which gives them all that they desire (Surabhi is the daughter of cow Kamadhenu).[7][9] A </span><span style="font-family:Calibri; font-weight:bold; font-style:italic; text-decoration:underline">king named Kartavirya Arjuna (not to be confused with Arjuna, the Pandava)[10][note 1] – learns about this cow of plenty and wants it.</span><span style="font-family:Calibri"> He asks Jamadagni to give it to him, but the sage refuses. While Parashurama is away from the hut, the king takes it by force.[7] When Jamadagni pleads his case and seeks for the return of the cow, the king strikes him with his fist, killing him. Parashurama learns about this crime, and is upset. With his axe in his hand, he challenges the king to battle. They fight, and Parashurama defeats and kills the king, according to the Padma Purana.[3][5]</span></p><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri">The wicked-minded one lost his valour due to his own sin. The mighty son of Reṇukā, being angry, cut off his head, as mighty Indra did the peak of a big mountain, and he who was brave and angry, killed Sahasrabāhu and all the kings with his axe in the battle. Seeing Rāma, the very fearful one, all kings on the earth, struck by fear, ran away as elephants do on seeing a lion. The angry Rāma killed the kings even though they had fled due to the resentment against his father's murder, as the angry Garuḍa killed the serpents. The valorous Rāma made the entire [world] clear of the kṣatriyas, but protected [i.e. spared] only the very great family of Ikṣvāku, due to its being the family to which his maternal grandfather was related, and due to his mother's words. </span></p><table style="border:0.75pt solid #000000; -aw-border:0.5pt single; -aw-border-insideh:0.5pt single #000000; -aw-border-insidev:0.5pt single #000000; border-collapse:collapse"><tr><td style="width:214.6pt; border-right:0.75pt solid #000000; border-bottom:0.75pt solid #000000; padding-right:5.03pt; padding-left:5.03pt; vertical-align:top; -aw-border-bottom:0.5pt single; -aw-border-right:0.5pt single"><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri; background-color:#ffff00">[O1] Signature</span></p></td><td style="width:214.6pt; border-left:0.75pt solid #000000; border-bottom:0.75pt solid #000000; padding-right:5.03pt; padding-left:5.03pt; vertical-align:top; -aw-border-bottom:0.5pt single; -aw-border-left:0.5pt single"><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri; background-color:#ffff00">[O1] Initial</span></p></td></tr><tr><td style="width:214.6pt; border-top:0.75pt solid #000000; border-right:0.75pt solid #000000; border-bottom:0.75pt solid #000000; padding-right:5.03pt; padding-left:5.03pt; vertical-align:top; -aw-border-bottom:0.5pt single; -aw-border-right:0.5pt single; -aw-border-top:0.5pt single"><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri; background-color:#ffff00">[CD] Signature</span></p></td><td style="width:214.6pt; border-top:0.75pt solid #000000; border-left:0.75pt solid #000000; border-bottom:0.75pt solid #000000; padding-right:5.03pt; padding-left:5.03pt; vertical-align:top; -aw-border-bottom:0.5pt single; -aw-border-left:0.5pt single; -aw-border-top:0.5pt single"><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri; background-color:#ffff00">[CD] Text</span></p></td></tr><tr><td style="width:214.6pt; border-top:0.75pt solid #000000; border-right:0.75pt solid #000000; padding-right:5.03pt; padding-left:5.03pt; vertical-align:top; -aw-border-right:0.5pt single; -aw-border-top:0.5pt single"><div style="-aw-sdt-tag:'BASIC__1001__1617__206__206'; -aw-sdt-title:'Counter Party Address'"><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri; background-color:#00ffff">Counter Party Address</span></p></div></td><td style="width:214.6pt; border-top:0.75pt solid #000000; border-left:0.75pt solid #000000; padding-right:5.03pt; padding-left:5.03pt; vertical-align:top; -aw-border-left:0.5pt single; -aw-border-top:0.5pt single"><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%"><span style="font-family:Calibri; -aw-import:ignore">&#xa0;</span></p></td></tr></table><p style="margin-top:0pt; margin-bottom:8pt; line-height:108%; font-size:11pt"><span style="font-family:Calibri; -aw-import:ignore">&#xa0;</span></p><p style="margin-top:0pt; margin-bottom:0pt"><span style="-aw-import:ignore">&#xa0;</span></p><div style="-aw-headerfooter-type:footer-primary; clear:both"><p style="margin-top:0pt; margin-bottom:0pt"><span style="-aw-import:ignore">&#xa0;</span></p></div></div></body>

@saurabh.arora
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-18209

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

We do have paid license. I will raise from there , but this is kind of critical/blocker issue for us.

@saurabh.arora Thank you for additional information. We will keep you updated and let you know once it is resolved.
Currently as a workaround, you can avoid using row and cell level SDTs in your documents, since such SDTs are not currently supported upon exporting to HTML using Aspose.Words.