VintaSoft Imaging .NET SDK 15.1: Документация для .NET разработчика
В этом разделе
Кодеки: Как преобразовать PDF в DOCX?
В этом разделе
VintaSoft Imaging .NET SDK позволяет конвертировать PDF документ в DOCX документ с использованием класса DocumentConverter, ImageCollection или PdfToDocxConverter. Использование класса DocumentConverter обеспечивает наилучшую производительность, поскольку класс DocumentConverter использует многопоточность.

Вот C#/VB.NET код, который демонстрирует, как преобразовать PDF документ в DOCX документ с помощью класса DocumentConverter:
/// <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


Вот C#/VB.NET код, который демонстрирует, как преобразовать PDF документ в DOCX документ с помощью класса ImageCollection:
/// <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


Вот C#/VB.NET код, который демонстрирует, как преобразовать PDF документ в DOCX документ с помощью класса PdfToDocxConverter:
/// <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