Hi KatieNgoc,
Check this example.
Using Spire.PDF
You can use Spire.PDF library.
Install using below command with Package Manager Console.
Install-Package Spire.PDF
Code
C#
string pdfFile = Server.MapPath("~/Files/Coding.pdf");
string wordFile = Server.MapPath("~/Files/Coding.docx");
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(pdfFile);
doc.SaveToFile(wordFile, FileFormat.DOCX);
VB.Net
Dim pdfFile As String = Server.MapPath("~/Files/Test.pdf")
Dim wordFile As String = Server.MapPath("~/Files/Test.docx")
Dim doc As PdfDocument = New PdfDocument()
doc.LoadFromFile(pdfFile)
doc.SaveToFile(wordFile, FileFormat.DOCX)
For more details refer e-iceblue: Convert PDF to Word.
Using SautinSoft.PdfFocus
You can use SautinSoft.PdfFocus library.
Install using below command with Package Manager Console.
Install-Package sautinsoft.pdffocus -Version 8.4.5.25
C#
string pdfFile = Server.MapPath("~/Files/Test.pdf");
string wordFile = Server.MapPath("~/Files/Test.docx");
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(pdfFile);
if (f.PageCount > 0)
{
f.WordOptions.Format = SautinSoft.PdfFocus.CWordOptions.eWordDocument.Docx;
f.ToWord(wordFile);
}
VB.Net
Dim pdfFile As String = Server.MapPath("~/Files/Test.pdf")
Dim wordFile As String = Server.MapPath("~/Files/Test.docx")
Dim f As SautinSoft.PdfFocus = New SautinSoft.PdfFocus()
f.OpenPdf(pdfFile)
If f.PageCount > 0 Then
f.WordOptions.Format = SautinSoft.PdfFocus.CWordOptions.eWordDocument.Docx
f.ToWord(wordFile)
End If
Screenshot
PDF
Word