This topic is locked

how to Upload doc & pdf file and store its content into field?

6/1/2012 3:56:04 PM
PHPRunner General questions
T
Tayyab Ilyas author

I wants to upload to extract the content of an uploaded file i.e doc or pdf and store the content of the file into textarea / textfield

Anyhelp on this?

C
cgphp 6/1/2012

You need a library to read the content of pdf or doc files.

T
Tayyab Ilyas author 6/2/2012



You need a library to read the content of pdf or doc files.


I am new to PHP can anyone suggest a library to read the content of pdf or doc files?
Regards

C
cgphp 6/2/2012
C
cjsaputo 6/2/2012

Try this link http://www.dynamsoft.com/products/webtwain_overview.aspx



I wants to upload to extract the content of an uploaded file i.e doc or pdf and store the content of the file into textarea / textfield

Anyhelp on this?

T
Tayyab Ilyas author 6/5/2012



Some links that can help:

http://webcheatsheet.com/php/reading_clean_text_from_pdf.php

http://webcheatsheet.com/PHP/reading_the_clean_text_from_docx_odt.php

http://webcheatsheet.com/php/reading_the_clean_text_from_rtf.php


Thanks for help i tried both for PDF and DOC but the given codes are not working properly for PDF its only working for the given sample file when i choose some other file it shows nothing may be because of some issue with version of PDF ??
For DOC its giving error in the given codes <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=66468&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
No Idea what to do...
Also the text returned in pdf is all in one line is there any code that can be used for parsing?

T
Tayyab Ilyas author 6/5/2012



Check this link: http://davidwalsh.name/read-pdf-doc-file-php


Read all posts and comments, but not working i guess its same issue of PDF version