public static void ConvertToDOCX()
{
// ExStart:ConvertToDOCX
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();
// Open the source PDF document
Document pdfDocument = new Document(dataDir + "PDFToDOC.pdf");
// Instantiate DocSaveOptions object
DocSaveOptions saveOptions = new DocSaveOptions();
// Specify the output format as DOCX
saveOptions.Format = DocSaveOptions.DocFormat.DocX;
// Save document in docx format
pdfDocument.Save("ConvertToDOCX_out.docx", saveOptions);
// ExEnd:ConvertToDOCX
}
}