You are here: Re: Help with pdf to text « PHP Programming Language « IT news, forums, messages
Re: Help with pdf to text

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация