Hi KatieNgoc,
You have to download the SautinSoft.PdfFocus.dll from the below link. A sample also provided. I have created sample by referring the below solution.
Convert PDF to Word document using C# and VB.Net in ASP.Net
Controller
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
string pdfFile = Server.MapPath("~/Files/About Mudassar Khan.pdf");
string docFileName = string.Format("{0}.docx", Path.GetFileNameWithoutExtension(pdfFile));
string docFilePath = string.Format("~/Files/{0}.docx", Path.GetFileNameWithoutExtension(pdfFile));
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(pdfFile);
if (f.PageCount > 0)
{
f.WordOptions.Format = SautinSoft.PdfFocus.CWordOptions.eWordDocument.Docx;
f.ToWord(Server.MapPath(docFilePath));
}
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection conn = new SqlConnection(constr))
{
string sql = "INSERT INTO Files (Name, FilePath) VALUES(@Name, @Path)";
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.AddWithValue("@Name", docFileName);
cmd.Parameters.AddWithValue("@Path", docFilePath);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
}
}
return View();
}
}
Screenshot
PDF
Word
Database(Output)
Note: Its a trail version dll and it can process only 300 paragraphs.