atlanhq / camelot

Camelot: PDF Table Extraction for Humans
https://camelot-py.readthedocs.io
Other
3.61k stars 349 forks source link

Bypass File Output When No Table Detected #415

Open nadolsw opened 4 years ago

nadolsw commented 4 years ago

Hello, I have had great success with Camelot so far. I've read through the documentation but have been unable to find an answer to this question.

When I parse a multi-page PDF (I'm using 'stream' method) it outputs a file for each page regardless of whether or not a table was detected. I've noticed that when there is no table detected, there is however a user warning issued "User Warning: No tables found in table area 1 [stream.py:361]".

Is there any way for a user to intercept this message and bypass the file creation when no table is detected or any built in methods to do so? It would be ideal if I could be more certain whether or not a table was detected within a parsed page.