code issue fix
This commit is contained in:
@@ -57,6 +57,7 @@ def get_pdf_type(pdf_path: str | Path) -> PDFType:
|
||||
return "scanned"
|
||||
|
||||
text_pages = 0
|
||||
total_pages = len(doc)
|
||||
for page in doc:
|
||||
text = page.get_text().strip()
|
||||
if len(text) > 30:
|
||||
@@ -64,7 +65,6 @@ def get_pdf_type(pdf_path: str | Path) -> PDFType:
|
||||
|
||||
doc.close()
|
||||
|
||||
total_pages = len(doc)
|
||||
if text_pages == total_pages:
|
||||
return "text"
|
||||
elif text_pages == 0:
|
||||
|
||||
Reference in New Issue
Block a user