DocConverter Plugin

Overview

The Aspose.Pdf.LowCode.DocConverter plugin converts PDF documents to Word formats. Configure the operation with PdfToDocOptions, choose a SaveFormat and ConversionMode, add input and output data sources, and call Process.

Convert PDF to DOCX

// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ConvertPdfToDocxWithPlugin()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();

    // Create PDF DocConverter plugin
    var plugin = new Aspose.Pdf.LowCode.DocConverter();

    // Configure DOCX conversion options
    var options = new Aspose.Pdf.LowCode.PdfToDocOptions(
        Aspose.Pdf.LowCode.SaveFormat.DocX,
        Aspose.Pdf.LowCode.ConversionMode.Flow);
    options.AddInput(new Aspose.Pdf.LowCode.FileDataSource(dataDir + "PDFToDOC.pdf"));
    options.AddOutput(new Aspose.Pdf.LowCode.FileDataSource(dataDir + "ConvertPdfToDocx_out.docx"));

    // Convert the file
    var result = plugin.Process(options);

    // Get the path of the saved DOCX document
    var outputPath = result.ResultCollection[0].ToFile();
}

Options

Use SaveFormat.Doc or SaveFormat.DocX to select the Word output format. Use ConversionMode.Flow when the output document should remain editable.