pdf to text

tubby tubby at bandaheart.com
Thu Jan 25 17:09:42 EST 2007


David Boddie wrote:

> The pdftotext tool may do what you want:
> 
>   http://www.foolabs.com/xpdf/download.html
> 
> Let us know how you get on with it.
> 
> David

Perhaps I'm just using pdftotext wrong? Here's how I was using it:

f = filename

try:
     sout = os.popen('pdftotext "%s" - ' %f)
     data = sout.read().strip()
     print data
     sout.close()

except Exception, e:
     print e



More information about the Python-list mailing list