Skip to content

Commit a0e0f04

Browse files
committed
return None at read_pdf
1 parent 0aaa38a commit a0e0f04

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/unstructured_client/_hooks/custom/pdf_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ def read_pdf(pdf_file: Union[BinaryIO, bytes]) -> Optional[PdfReader]:
7373
except Exception as e:
7474
pdf_logger.debug(f"%PDF- slicing fallback failed: {e}")
7575

76-
raise PDFValidationError(
77-
"File does not appear to be a valid PDF after all fallback attempts."
78-
)
76+
return None
7977

8078

8179
def read_pdf_raw(pdf_file: Union[BinaryIO, bytes]) -> Optional[PdfReader]:

0 commit comments

Comments
 (0)