Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NETWindows
I have to convert pdf file into a word file which is Editable.
Please give me any Suggestion to do this task.
Thanks.
Posted 19-Nov-12 0:19am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Check this similar thread
How to convert PDF to WORD in c#[^]
  Permalink  
Comments
Mohd Imran Saifi at 25-Nov-12 1:32am
   
thanks
__TR__ at 26-Nov-12 2:47am
   
You're Welcome.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Convert Word-Documents to PDF on an ASP.NET Server[^]
 
This article may be helpful!
  Permalink  
Comments
Mohd Imran Saifi at 25-Nov-12 1:33am
   
thanks
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

using Microsoft.Office.Interop.Word;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
 
...
 
// Create a new Microsoft Word application object
Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
 
// C# doesn't have optional arguments so we'll need a dummy value
object oMissing = System.Reflection.Missing.Value;
 
// Get list of Word files in specified directory
DirectoryInfo dirInfo = new DirectoryInfo(@"\\server\folder");
FileInfo[] wordFiles = dirInfo.GetFiles("*.doc");
 
word.Visible = false;
word.ScreenUpdating = false;
 
foreach (FileInfo wordFile in wordFiles)
{
    // Cast as Object for word Open method
    Object filename = (Object)wordFile.FullName;
 
    // Use the dummy value as a placeholder for optional arguments
    Document doc = word.Documents.Open(ref filename, ref oMissing,
        ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
        ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
        ref oMissing, ref oMissing, ref oMissing, ref oMissing);
    doc.Activate();
 
    object outputFileName = wordFile.FullName.Replace(".doc", ".pdf");
    object fileFormat = WdSaveFormat.wdFormatPDF;
 
    // Save document into PDF Format
    doc.SaveAs(ref outputFileName,
        ref fileFormat, ref oMissing, ref oMissing,
        ref oMissing, ref oMissing, ref oMissing, ref oMissing,
        ref oMissing, ref oMissing, ref oMissing, ref oMissing,
        ref oMissing, ref oMissing, ref oMissing, ref oMissing);
 
    // Close the Word document, but leave the Word application open.
    // doc has to be cast to type _Document so that it will find the
    // correct Close method.                
    object saveChanges = WdSaveOptions.wdDoNotSaveChanges;
    ((_Document)doc).Close(ref saveChanges, ref oMissing, ref oMissing);
    doc = null;
}
 
// word has to be cast to type _Application so that it will find
// the correct Quit method.
((_Application)word).Quit(ref oMissing, ref oMissing, ref oMissing);
word = null;
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

I believe the solution by Krunal R does the opposite of what you want.
If the PDF already has text objects, you will only need to parse it and create a Word file and insert the object into it.
If the PDF contain images and you want to convert the images to text, you will need OCR.
If you need OCR, there are lots of good OCR engines available on the internet. Some of them free and others commercial. I used an engine from leadtools a while back and it was great. You can find a lot of articles on how to OCR images.
Here is a link for an OCR project that I used at the beginning of my OCR project:
OCR
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Shai Vashdi 576
1 Sergey Alexandrovich Kryukov 230
2 Tadit Dash 215
3 OriginalGriff 183
4 Peter Leow 130
0 Sergey Alexandrovich Kryukov 9,325
1 OriginalGriff 5,473
2 Peter Leow 4,150
3 Maciej Los 3,540
4 Abhinav S 3,333


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid