Hello All,
I would like to know whether is it possible to display a word document in a textarea using PHP.
Regads
[56K WARN] display a word document in a textarea using PHP
Moderator: General Moderators
-
dream2rule
- Forum Contributor
- Posts: 109
- Joined: Wed Jun 13, 2007 5:07 am
-
dream2rule
- Forum Contributor
- Posts: 109
- Joined: Wed Jun 13, 2007 5:07 am
-
dream2rule
- Forum Contributor
- Posts: 109
- Joined: Wed Jun 13, 2007 5:07 am
To be more specific...

I am uploading a word file and storing it in a folder in the project directory.
Now, I have the path to the word file which was uploaded.
I am trying to open that file and reading its contents and displaying it in the textarea.
But in the textarea.. along with the file contents, even the properties of that word file are being displayed.

I want to know is there anyway i can display only he contents of the word file in the textarea leaving aside the properties of the word file.
Thanks and Regards

I am uploading a word file and storing it in a folder in the project directory.
Now, I have the path to the word file which was uploaded.
I am trying to open that file and reading its contents and displaying it in the textarea.
But in the textarea.. along with the file contents, even the properties of that word file are being displayed.

I want to know is there anyway i can display only he contents of the word file in the textarea leaving aside the properties of the word file.
Thanks and Regards
US link to COM class from above does not work, try this one instead:
http://www.php.net/manual/en/ref.com.php
http://www.php.net/manual/en/ref.com.php
-
dream2rule
- Forum Contributor
- Posts: 109
- Joined: Wed Jun 13, 2007 5:07 am
hie feyd..feyd wrote:Unfortunately, Word documents are binary files, not simple text. You will have to parse them, whether you like it or not. I'd suggest switching to a more straight forward document format, be it XML, RTF, or plain text.
But the point is.. i am uploading a resume of the user which is generally in a .doc format.
How do i get only the entire details of his resume but not the properties of the word document!
Regards,
Basically you can't. While it's possible using the COM interface to MS Word the chance of that working on a live production server are close to zero. You'd have to put Word on the server. Writing a parser that works with every version of the .doc format would be years of work.dream2rule wrote:How do i get only the entire details of his resume but not the properties of the word document!
My advice... rethink. Why do you need to display the file contents in a text area? What are you doing with the content?
Also, somewhat off topic, if you're in the UK your form there is going to be breaking the law. Asking someone how much experience they have violates the new Employment Equality (Age) Regulations 2006 act.