|
Posted by Tim Roberts on 12/16/13 11:57
"noodle_snacks" <noodle_snacks@yahoo.com.au> wrote:
>
>I am trying to use the sample of code posted by thodge at ipswich dot
>qld dot gov dot au found here:
>
>http://au2.php.net/pdf
>
>In order to convert a PDF file to a string. I am currently trying with
>this document:
>http://www.tececo.com/files/appraisals/GlasserTecEcoAppraisal.pdf
>however others fail in the same fashion. Basically the file read works,
>
>since echoing $content after this point:
>
> $fp = fopen($sourcefile, 'rb');
> $content = fread($fp, filesize($sourcefile));
> fclose($fp);
>
>Works fine, however using echo pdf2string($sourcefile) the final
>result of this script is blank output. Can anyone suggest what could be
>the problem inthe way I am using it, or another easy to use, cross
>platform script that will extract the text from PDF files?
That PDF file is compressed, as most PDF files are. The script you
provided only works on uncompressed PDF files. You can use the "pdftk"
tool to uncompress it.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Navigation:
[Reply to this message]
|