How to convert PDF to Doc in C#, VB.NET

PDF files is widely used for its convenience and safety on the Internet, meanwhile in daily work DOC files is more common in their degree of versatility and editability. So converting PDF to DOC files can make a secondary edition and follow use to the files. This article is mainly talk about how to convert PDF to DOC via Spire.PDF.

Our sample PDF files include image, text and hyperlink.

PDF screenshot as follows:

How to convert PDF to Doc in C#, VB.NET

You can realize your requirement of converting PDF to DOC in several lines of code. Here are the steps:

Step 1: Create a PDF document and load sample PDF.

PdfDocument doc = new PdfDocument();
doc.LoadFromFile("test.pdf");

Step 2: Use SaveToFile method and set conversion target parameter as FileFormat.DOC.

doc.SaveToFile("PDFtoDoc.doc", FileFormat.DOC);

Step 3: Save and review.

System.Diagnostics.Process.Start("PDFtoDoc.doc");

Here are the screenshot:

How to convert PDF to Doc in C#, VB.NET

Full code:

PdfDocument doc = new PdfDocument();
doc.LoadFromFile("test.pdf");
doc.SaveToFile("PDFtoDoc.doc", FileFormat.DOC);
System.Diagnostics.Process.Start("PDFtoDoc.doc");