Link Details

Link 145798 thumbnail
User 238392 avatar

By davidwalsh
via davidwalsh.name
Published: Jan 02 2009 / 13:51

One of my customers has an insane amount of PDF and Microsoft Word DOC files on their website. It’s core to their online services so it’s not as though they’re garbage files up on the server. My customer wanted their website’s search engine (Sphider) to read these PDF files and DOC files so that their clients could get at the documents they needed without going through a bunch of summary pages to get them. I was successful in the task, so let me show you how to read PDF and DOC files using PHP.
  • 14
  • 6
  • 9577
  • 119
SaveShareSend Tags: none

Comments

Add your comment
User 285418 avatar

Motion Control replied ago:

1 votes Vote down Vote up Reply


shell_exec('/usr/local/bin/pdftotext '.$filename.' -');


Oops!

User 380006 avatar

leo.bonnafe replied ago:

1 votes Vote down Vote up Reply

The easiest way to read DOC, DOCX and RTF files in PHP is with a project called phpLiveDocx - http://www.phplivedocx.org. Not only is it really easy to use, but you also avoid shelling out with shell_exec() :-) Have fun! Leo
,

User 399394 avatar

raneeq replied ago:

0 votes Vote down Vote up Reply

Here is an easiest way to read pdf in word document. That is using anybizsoft pdf to word converter, you may right-click the pdf file and read pdf in word directly. Here you may have a free trial: http://www.anypdftools.com/pdf-to-word.html#153

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java