ayoksus Posted December 15, 2012 Share Posted December 15, 2012 (edited) Hi, I'm about to make a translator site where people can order a translator to translate their documents. From the site people are able to upload their file then it would be connected to a translator/member of the site. The problem is how I make an application that count the price from the document. The most common way to rate the translation price is per word. So I need to know how many words in the document that a customer's uploaded. I thought there must be possible to count words from text file such as a word document. However, I couldn't find any way to get exact amount of a ms word 2003 document (.doc). I've found a way to count .docx, but not .doc. And there will be more files such as PDF, or rtf. I've seen another method which only count the file size, but I don't think it would give the same result for different document format. Or it is? The simple way I could think is to ask the visitors to copy/paste their text on a textarea, but I don't think this is the best way. Would someone gives me an advice how can I solve this? Thanks, ayok Edited December 15, 2012 by ayoksus Quote Link to comment https://forums.phpfreaks.com/topic/272036-translator-site/ Share on other sites More sharing options...
Amplivyn Posted December 15, 2012 Share Posted December 15, 2012 Just a thought, be sure your users know that pdf files (and others possibly) should be written with actual text characters rather than scans of pages, if your program will grab text from the file. Quote Link to comment https://forums.phpfreaks.com/topic/272036-translator-site/#findComment-1399581 Share on other sites More sharing options...
ayoksus Posted December 15, 2012 Author Share Posted December 15, 2012 Yea that could another problem. But I'm still stuck with counting from word 2003 file. Quote Link to comment https://forums.phpfreaks.com/topic/272036-translator-site/#findComment-1399582 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.