jalan / pdftotext

Simple PDF text extraction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: module 'pdftotext' has no attribute 'PDF'

vignesh-bosch opened this issue · comments

import pdftotext

Load your PDF

with open(r"test_batch\test1.pdf", "rb") as f:
pdf = pdftotext.PDF(f)

How many pages?

print(len(pdf))

It returns:

AttributeError: module 'pdftotext' has no attribute 'PDF'

How did you install the module? Please be thorough.

command used to install package.

image

pip install pdftotext

Okay, on what OS? If you actually want help, you need to put in a little more effort, give some kind of information.

Nothing useful here so far