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)