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?

Thanks

rbhargawFounderAsked:
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.

jkrCommented:
For the PDF part, see http://www.codeproject.com/KB/cpp/ExtractPDFText.aspx ("Code to extract plain text from a PDF file"). Regarding Word documents, would OLE Automation be acceptable for you?
0

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:
http://www.codeproject.com/KB/office/MSOfficeAuto.aspx
0
rbhargawFounderAuthor Commented:
Thanks jkr! I will check the given link for the pdf ... OLE Automation will work ..let me know more details!
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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 http://www.codeproject.com/KB/cpp/ExtractPDFText.aspx 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!
0
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
0
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.
0
WegelinCommented:
the best and fastest Way is

www.textlib.com

i convert every day more then 20'000 Dokuments

0
WegelinCommented:
or there is a other good site

http://www.ultrashareware.com/
0
rbhargawFounderAuthor Commented:
I have to de-commission the project due to non format of the document to send fa..so just assigning the points to those who helped!
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.