fixing reader pdf single page

This commit is contained in:
dmsanhrProject 2025-11-06 14:57:08 +07:00
parent 9c856c75da
commit 2575a34742

View File

@ -172,7 +172,9 @@ def parse_page_selection(selectedPage: str, total_pages: int):
def read_pdf(path: str, page: str):
pdf_path = path
selectedPage = page
selectedPage = None
if page == '' or None:
selectedPage = "1"
tables_data = []
with pdfplumber.open(pdf_path) as pdf:
total_pages = len(pdf.pages)
@ -219,7 +221,7 @@ def read_pdf(path: str, page: str):
})
clean_parsed = filter_geo_admin_column(parsed)
print(f"parsed{clean_parsed}")
# print(f"parsed{clean_parsed}")
return clean_parsed