VintaSoft Imaging .NET SDK 12.5: Documentation for .NET developer
In This Topic
    Codecs: How to convert PDF to DOCX?
    In This Topic
    VintaSoft Imaging .NET SDK allows to convert PDF document to a DOCX document using class DocumentConverter, ImageCollection or PdfToDocxConverter. Usage of DocumentConverter class provides the best performance because DocumentConverter class uses multi-threading.


    Here is C#/VB.NET code that shows how to convert PDF document to a DOCX document using DocumentConverter class:
    /// <summary>
    /// Converts PDF file to a DOCX file using Vintasoft.Imaging.DocumentConverter class.
    /// </summary>
    public static void ConvertPdfToDocx_DocumentConverter(string pdfFileName, string docxFileName)
    {
        Vintasoft.Imaging.DocumentConverter.Convert(pdfFileName, docxFileName);
    }
    
    ''' <summary>
    ''' Converts PDF file to a DOCX file using Vintasoft.Imaging.DocumentConverter class.
    ''' </summary>
    Public Shared Sub ConvertPdfToDocx_DocumentConverter(pdfFileName As String, docxFileName As String)
        Vintasoft.Imaging.DocumentConverter.Convert(pdfFileName, docxFileName)
    End Sub
    


    Here is C#/VB.NET code that shows how to convert PDF document to a DOCX document using ImageCollection class:
    /// <summary>
    /// Converts PDF file to a DOCX file using Vintasoft.Imaging.ImageCollection class.
    /// </summary>
    public static void ConvertPdfToDocx_ImageCollection(string pdfFileName, string docxFileName)
    {
        // create image collection
        using (Vintasoft.Imaging.ImageCollection imageCollection = new Vintasoft.Imaging.ImageCollection())
        {
            // add PDF document to collection
            imageCollection.Add(pdfFileName);
    
            // save images of image collection to a DOCX file
            imageCollection.SaveSync(docxFileName);
    
            // dispose images
            imageCollection.ClearAndDisposeItems();
        }
    }
    
    ''' <summary>
    ''' Converts PDF file to a DOCX file using Vintasoft.Imaging.ImageCollection class.
    ''' </summary>
    Public Shared Sub ConvertPdfToDocx_ImageCollection(pdfFileName As String, docxFileName As String)
        ' create image collection
        Using imageCollection As New Vintasoft.Imaging.ImageCollection()
            ' add PDF document to collection
            imageCollection.Add(pdfFileName)
    
            ' save images of image collection to a DOCX file
            imageCollection.SaveSync(docxFileName)
    
            ' dispose images
            imageCollection.ClearAndDisposeItems()
        End Using
    End Sub
    


    Here is C#/VB.NET code that shows how to convert PDF document to a DOCX document using PdfToDocxConverter class:
    /// <summary>
    /// Converts PDF file to a Docx file using Vintasoft.Imaging.Pdf.Office.PdfToDocxConverter class.
    /// </summary>
    public static void ConvertPdfToDocx_PdfToDocxConverter(string pdfFileName, string docxFileName)
    {
        Vintasoft.Imaging.Pdf.Office.PdfToDocxConverter.Convert(pdfFileName, docxFileName);
    }
    
    ''' <summary>
    ''' Converts PDF file to a Docx file using Vintasoft.Imaging.Pdf.Office.PdfToDocxConverter class.
    ''' </summary>
    Public Shared Sub ConvertPdfToDocx_PdfToDocxConverter(pdfFileName As String, docxFileName As String)
        Vintasoft.Imaging.Pdf.Office.PdfToDocxConverter.Convert(pdfFileName, docxFileName)
    End Sub