Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Camelot is reading only the first page of the pdf

tables = camelot.read_pdf(r"C:\Users\Ayush ShaZz\Desktop\Code_Python\FoodCaloriesList.pdf")
for table in tables:
    print(table.df)

Its reading only the first page. Someone please help me out

like image 865
Ayush ShaZz Avatar asked Jun 26 '19 16:06

Ayush ShaZz


2 Answers

By default Camelot only uses the first page, see here: https://camelot-py.readthedocs.io/en/master/user/quickstart.html

From the link, you can do multiple pages:

camelot.read_pdf('your.pdf', pages='1,2,3')

Or, if you want to use them all:

camelot.read_pdf('your.pdf',pages=1,4-10,20-end )
like image 58
Kamuish Avatar answered Oct 19 '22 19:10

Kamuish


If you want to read all the pages in a pdf then use:

camelot.read_pdf('your.pdf', pages='all')
like image 6
Richtea88 Avatar answered Oct 19 '22 17:10

Richtea88