Field is exchanged to its code after conversion from DOCX to HTML/PDF format

I have converted a *.docx document to *.pdf and *.html format with Aspose.Words and the result document have a few inconsistencies.

The most affected pages:

  • 1: The Field is converted to its code - ‘STYLEREF …’.

I also tried to save the document to *.docx after the conversions and the field is converted as well. If the document is resaved to *.docx right away, the field stays the same.
MS Word doesn’t change the field when printing or exporting to *.pdf.
I attached the document.

Code sample:

var doc = new Document(inPath);

var optHtml = new HtmlFixedSaveOptions()
{
	PageSet = new PageSet(new PageRange(0, int.MaxValue)),
	ExportEmbeddedCss = true,
	ExportEmbeddedFonts = true,
	ExportEmbeddedImages = true,
	ExportEmbeddedSvg = true
};
doc.Save(inPath + ".html", optHtml);

var optPdf = new PdfSaveOptions();
doc.Save(inPath + ".pdf", optPdf);

doc.Save(inPath + ".docx", SaveFormat.Docx);

I use Aspose.Words.dll 25.2.0.0 and Microsoft® Word for Microsoft 365 MSO (Version 2501 Build 16.0.18429.20132) 64-bit.
test37.zip (23.6 KB)

@licenses
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-27968

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.