How to Convert PDF to Word in C# Without Interop

In this tutorial you will learn how to convert PDF to Word in C# without interop. We will use simple console application to generate DOCX from PDF using C#. By using the same approach, you can export FlatOpc from PDF also. The conversion from PDF to Word file format is two lines of code and can be used in Desktop and Web applications.

Steps to Convert PDF to DOCX in C#

  1. Install Aspose.Words for .NET package from NuGet.org
  2. Add reference to Aspose.Words and Aspose.Words.Saving namespaces
  3. Set license using License.SetLicense method before importing PDF
  4. Import the input PDF document into Aspose.Words’ DOM
  5. Save the document to Word DOCX file format

In the last how-to topic, we looked into How to Convert Word Document to Images in C#. This topic explains all steps to save DOCX from PDF in C#.

Code to Convert PDF to DOCX in C#

You can also convert PDF to other file formats e.g. WordML, DOC, RTF etc. To save the PDF to other file formats, you need to change the output filename extension and SaveFormat in Document.Save method.

 English