Formula Conversion

I used the following code to convert a word document to pdf document.

Document document = new Document(inputPath);
// Set the export images folder.
document.SaveOptions.ExportImagesFolder = tempDirectory;
#endregion
#region Convert the Word document to PDF.
Pdf pdf = new Pdf();
// Delete any temporary images after the conversion is complete.
pdf.IsImagesInXmlDeleteNeeded = true;
using(MemoryStream ms = new MemoryStream())
{
    // Convert the file to the Aspose.Pdf.Xml format.
    document.Save(ms, SaveFormat.AsposePdf);
    // Read in the document XML.
    pdf.BindXML(ms, null);
    ms.Close();
}

But there are some characters in word are being converted. For example, $D is converted to Today’s date. I guess this is one of the predefined function/formula that Aspose recognizes. Is there a way to turn off the conversion?

This message was posted using Aspose.Live 2 Forum

Hello

Thanks for your request. I cannot reproduce the problem on my side using the latest version of Aspose.Words (9.3.0). You can download this version from here:
https://releases.aspose.com/words/net
I use the following code for testing:

Document doc = new Document("Test.doc");
// Save to PDF
doc.Save("out.pdf", SaveFormat.Pdf);

Best regards,

I’m using version 5.2.2.0. I’ll try get the latest version. So, the conversion wasn’t by design then. I thought it was a feature. Anyway, if I still have any issue after upgrade, I’ll let you know. Thanks,