note 53568 added to ref.pdf
| From: | jonathan dot beckett at gmail dot com | Date: | Mon, 06 Jun 2005 10:03:43 +0000 |
| Subject: | note 53568 added to ref.pdf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89999@lists.php.net to get a copy of this message | ||
After spending ages writing my own PDF to text extraction routine (well... a couple of hours), I
realised that you have to interpret the entire stream to have a hope of getting all the characters
you really want - so I started digging.
I then discovered that the XPDF project has everything you need to deal with PDFs - Linux and Win32
binaries are available. Most distro's have the RPMs too.
The resultant command is thus;
$result = shell_exec("pdftotext -raw ".$filename." -");
...it works perfectly for content searching purposes.
----
Manual Page -- http://www.php.net/manual/en/ref.pdf.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53568
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53568&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53568&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53568&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53568&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53568&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53568&report=yes
Search -- http://master.php.net/manage/user-notes.php