Hi Team
We are having a Aspose.Total.Lic File for .NET . we need to check How to use Aspose.LIC File in Python. and read table in pdf. pls Do the needful help.
Thanks and Regards,
yajiv Vijay.
Hi Team
We are having a Aspose.Total.Lic File for .NET . we need to check How to use Aspose.LIC File in Python. and read table in pdf. pls Do the needful help.
Thanks and Regards,
yajiv Vijay.
from aspose.pdf import License
from aspose import pdf
license = License()
license.set_license(“C:\Users\Downloads\Aspose.Total.lic”)
pdfDocument = pdf.Document(“C:/Users/Documents/Sample_pdf_caplin/Data/Alarm_1.pdf”)
tableAbsorber = pdf.text.TableAbsorber()
tableAbsorber.visit(pdfDocument.pages[1])
absorbedTable = tableAbsorber.table_list[0]
for pdfTableRow in absorbedTable.row_list:
# Iterate through all the columns
for pdfTableCell in pdfTableRow.cell_list:
# Fetch the text fragments
textFragmentCollection = pdfTableCell.text_fragments
# Iterate through the text fragments
for textFragment in textFragmentCollection:
# Display the text
print(textFragment.text)
print(“Data read successfully from the table”)
Hi team ,
we are having this below error
RuntimeError: Proxy error(InvalidOperationException): The license is not valid for this product.
Thanks and regards,
yajiv Vijay
Please note, Aspose.Total for .NET license cannot be used with Python APIs, it can only be used for Aspose .NET APIs. You need to have Python license to work with Aspose for Python SDK/library, e.g., Aspose.Total for Python.NET.lic or Aspose.PDF for Python.NET.lic.