Doc/pdf to ascii conversion, VC++, mfc

Hello Experts,

I have an requirement where a document (.doc) and pdf file( .pdf) needs to be converted to ASCII text. So that the ASCII text file can be sent to fax server to be faxed.

1. Let me know how to achieve this requirement in VC++, MFC( Unmanaged code)??
2. If there is a commerically used API, which can be used?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

For the PDF part, see ("Code to extract plain text from a PDF file"). Regarding Word documents, would OLE Automation be acceptable for you?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jaime OlivaresSoftware ArchitectCommented:
For Word, you can automate Microsoft Word:
Open the document, Select all, copy to clipboard
Then you can get the contents of the text version of the clipboard.

For office automation, have a look at:
rbhargawFounderAuthor Commented:
Thanks jkr! I will check the given link for the pdf ... OLE Automation will work ..let me know more details!
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

rbhargawFounderAuthor Commented:
Thanks James! Currently we use Mail Merge technology to get the details of customer and send them the emails. I can't automate initially itself as the details of the customer will not be present.

@jkr : I tested the setup present in but the result was not as expected. I converted a pdf file to text but the output text file didn't hold on to the format . Any other link or any commerically used API will also do...let me know!
AndyAinscowFreelance programmer / ConsultantCommented:
If you could convert pdf into doc format (I don't know how) then you could get on from there with your task.

  • pdf -> doc -> text
  •           doc -> text
AndyAinscowFreelance programmer / ConsultantCommented:
Hit submit too soon - I said that just in case one got to obsessed with converting pdf into text in one step and didn't notice the alternative two step.
the best and fastest Way is

i convert every day more then 20'000 Dokuments

or there is a other good site
rbhargawFounderAuthor Commented:
I have to de-commission the project due to non format of the document to send just assigning the points to those who helped!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.