Pdf to word

Joined
Jul 18, 2017
Messages
3
Reaction score
0
Have to convert pdf to word document without 3rd party dll .. any help is appreciated
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
Word 2013 & later can read PDFs without the need for a 3rd-party converter. You can then save the imported PDF as a Word document.
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
Your first post said nothing about needing C# code. Anyone even moderately competent with C# and the Word Object Model would know how to open a file programmatically.
 
Joined
Sep 15, 2017
Messages
2
Reaction score
0
How? I need code in c#
.NET framework does not have any native way to accomplish this, so you'll need a 3rd party dll.
Now there are two ways that I know of:

1. Using Microsoft.Office.Interop.Word version 12.0.0.0 or greater:

Code:
var application = new Application();
application.Visible = false;

var document = application.Documents.Open(FileName: "sample.pdf");
document.SaveAs2(FileName: "sample.docx", FileFormat: WdSaveFormat.wdFormatDocumentDefault);

document.Close();
application.Quit();

System.Runtime.InteropServices.Marshal.ReleaseComObject(document);
System.Runtime.InteropServices.Marshal.ReleaseComObject(application);

Also see: How to: Programmatically Open Existing Documents

2. Using GemBox.Document version 2.5 or greater:

Code:
DocumentModel.Load("sample.pdf").Save("sample.docx");

Also see: Read and Extract PDF Text in C# and VB.NET
 
Joined
Sep 24, 2017
Messages
1
Reaction score
0
its very easy step . Click Cntrl+Shift+S select the file saving folder then select file format PDF . Job done .
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
its very easy step . Click Cntrl+Shift+S select the file saving folder then select file format PDF . Job done .
Please read the entire thread, especially post #3!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top