here is the code its not working. showing me error
import aspose.pdf as pdf
#Load PDF file
pdfDocument = pdf.Document("/content/example2.pdf")
#Initialize TableAbsorber object
tableAbsorber = pdf.text.TableAbsorber()
#Parse all the tables on first page
tableAbsorber.visit(pdfDocument.pages[1])
#Get a reference of the first table
absorbedTable = tableAbsorber.table_list[0]
#Iterate through all the rows in the table
for pdfTableRow in absorbedTable.row_list:
#Iterate through all the columns in the row
for pdfTableCell in pdfTableRow.cell_list:
#Fetch the text fragments
textFragmentCollection = pdfTableCell.text_fragments
#Iterate through the text fragments
for textFragment in textFragmentCollection:
#Print the text
print(textFragment.text)
error
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-5-179122f711c4> in <cell line: 10>()
8 tableAbsorber.visit(pdfDocument.pages[1])
9 #Get a reference of the first table
---> 10 absorbedTable = tableAbsorber.table_list[0]
11
12 #Iterate through all the rows in the table
IndexError: list index out of range