-1

I need to extract the text from a word document (only the text) and transcript the text into a textarea.

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
Gargantua
  • 420
  • 2
  • 5
  • 17
  • Just do it. More seriously: what did you try? We won't do your job for you/for free, we help solving bugs. – sjahan Jun 29 '18 at 07:05
  • Salty, but also true though, no offense meant... We help for bugs and specific technical matter, you can't just come and ask "how should I do from scratch": that is the purpose of Google. When you have absolutely no clue, you have to make a little bit of research on your own mate! – sjahan Jun 29 '18 at 07:29
  • You are right, sincerly i've searched too a solution for my problem but i didn't find anything that would fit my project so i asked to this community. I was just to lazy to make a correct formed question. – Gargantua Jun 29 '18 at 07:31

2 Answers2

1

this may help. please try to search for answers before ask. may be a possible duplicate of How to extract text from word file .doc,docx,.xlsx,.pptx php

1

Here is what I would do if I were you!

I would use one of the following libs to read the RTF:

I don't know which one is the best, so you have to test them a bit. They both produce HTML code, with the style matching the original one.

I think you want to get read of that (you mentionned you just want the text), so I would get the generated HTML, I would set it in an hidden div and I would extract only the text with innerText.

sjahan
  • 5,720
  • 3
  • 19
  • 42