none
PDF to Word Converter RRS feed

  • Question

  • Hi,

    I am looking for a dll, ideally free one, to convert a PDF file to a Word file.

    Upon Google search many paid dll's(itextSharp, PDFBox, Sautinsoft,RasterEdge,etc.,) are only found not a free one.

    Is there any free dll available to read the PDF content and write them to a Word file?

    Or is there any other way to achieve this ?

    Thanks,

    Jegadheswari


    Jegadheswari

    Monday, March 27, 2017 10:44 AM

All replies

  • If you're using Word 2013 or later, that can open PDFs without the need for a converter.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    • Proposed as answer by macropodMVP Monday, August 28, 2017 8:09 AM
    Tuesday, March 28, 2017 12:00 AM
  • Hi Jegadheswari,

    I agree with the suggestion given by macropod.

    if you are using the Word 2013 or 2016 version then you can directly open the PDF File in MS Word and also you can edit it. it is inbuilt feature so you not need to pay extra for it.

    but you want a DLL file, so it is possible that you are developing some application in which you need to convert from PDF to WORD.

    I try to find the free DLL, but they are only provided dll to use for specific amount of time for trial and after that you need to buy it.

    you did not mentioned that on which platform you are trying to develop.

    if you can use VBA then you can use code below to convert PDF to Word.

    Sub convertToWord()
       Dim MyObj As Object, MySource As Object, file As Variant
       file = Dir("D:\OfficeDev\Word\201505\Pdf\" & "*.pdf") 'pdf path
       Do While (file <> "")
       ChangeFileOpenDirectory "D:\OfficeDev\Word\201505\Pdf\" 
              Documents.Open FileName:=file, ConfirmConversions:=False, ReadOnly:= _
            False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
            "", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
            Format:=wdOpenFormatAuto, XMLTransform:=""
        ChangeFileOpenDirectory "D:\OfficeDev\Word\201505\Pdf\Word"'path for saving word
        ActiveDocument.SaveAs2 FileName:=Replace(file, ".pdf", ".docx"), FileFormat:=wdFormatXMLDocument _
            , LockComments:=False, Password:="", AddToRecentFiles:=True, _
            WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
             SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
            False, CompatibilityMode:=15
        ActiveDocument.Close
         file = Dir
       Loop
    End Sub

    Reference:

    Can I use VBA to Convert PDF Files to Word Docs or Text Files?

    if you are working on .net platform then you can try to use Word Interop to convert PDF to WORD.

    other then that you can try to buy the DLL.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 28, 2017 2:05 AM
    Moderator
  • Thanks for your suggestion Deepak!

    Yes, as you stated, i need to use in one of my application. I have implemented the interop option, as my application is been created using .net platform.

    I was looking for any dlls would this job too.


    Jegadheswari

    Tuesday, March 28, 2017 4:32 AM
  • Hi Jegadheswari,

    As I mentioned before , it looks like there is no free DLL available currently.

    so if you want to use DLL then you have to purchase it.

    this is the only way you can solve your issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 28, 2017 6:09 AM
    Moderator
  • You can use free Spire.PDF to convert a PDF to a Word (.doc) file. But this free library is limited to 10 pages when loading a PDF document, that's to say, if your documents do not exceed 10 pages, then you can make the file conversion successfully.

    PdfDocument doc = new PdfDocument();
    doc.LoadFromFile(@"D:\MyPDF\sample.pdf");
    doc.SaveToFile("toWord.doc", FileFormat.DOC);


    • Edited by Ezreal93 Tuesday, March 28, 2017 6:24 AM
    Tuesday, March 28, 2017 6:23 AM
  • Hi @Deepak Panchal10 

    On using the interop option to convert the PDF to DOCX, difference in page count is observed between the actual PDF document and the converted word document.

    Is there a way to rectify this problem?



    Jegadheswari

    Monday, April 3, 2017 7:21 AM
  • Hi Jegadheswari,

    I try to find the word object model.

    but it looks like , we don't have any control over that.

    so there is no way to find the difference directly.

    but you can try to get the page count when you open the pdf file.

    var numberOfPages = document.ComputeStatistics(WdStatistic.wdStatisticPages, false);

    then after converting it to word again try to get the page count of word document and then you can match them both.

    this is how you can try to find the difference.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 3, 2017 8:45 AM
    Moderator
  • On using the interop option to convert the PDF to DOCX, difference in page count is observed between the actual PDF document and the converted word document.

    That's most likely because you're not using a printer whose driver replicates the character & line spacing exactly the same as in the program originally used to create the file (even if Word). The behaviour is quite normal and is often seen in document layouts changing when the same document is opened on different computers - or even on the same computer when the active printer is changed. The reason for this is that Word uses information from the active printer driver to optimise the document layout for that printer.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, April 3, 2017 11:34 AM