Hello admin Try this code
// Load the document from disk.
System::SharedPtr doc = System::MakeObject(inputDataDir + u"Rendering.doc");
System::String outputPath = outputDataDir + u"Doc2Pdf.SaveDoc2Pdf.pdf";
// Save the document in PDF format.
doc->Save(outputPath);