Find table inside pdf and extract it



I’m trying to search a table in pdf file and extract the same. After extracting the table, i need to save it into a csv or excel file. Can anyone guide me on how to open a pdf and search for table inside it.

I have tried using read pdf with ocr activity to read the pdf file and used an if condition to check if the column name exists in the pdf but not able to extract the table.

Please correct me if the above approach is incorrect to find the table inside pdf.