atlanhq / camelot

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

Example of wrong output #297

Closed aborruso closed 5 years ago

aborruso commented 5 years ago

Hi, if I run camelot -p 11 -o test.csv --format csv lattice _11032019105856.pdf int this file, the output of the second cell in row 2 is in the first cell.

image

1 2 3 4
"K B 27362 APPART MQ. 90 CON" "" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 27423" "TERRAZZA MQ. 86" "FINALITA' SOCIALI" "pertinenza"
"K B 39458" "APPART MQ. 80" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 22162" "APPART MQ. 72" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 31573" "APPARTMQ. 135" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 31579" "APPART MQ. 140" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 22250" "APPART MQ. 78" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 22253" "APPART MQ. 59" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 27084" "APPART MQ. 85 + PERTINENZA SCOPERTAMQ. 40" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"
"K B 27084" "APPART MQ. 90 + PERTINENZE SCOPERTEMQ. 65" "FINALITA' SOCIALI" "Assegnato a Nucleo familiare Assegnazione rinnovabile"

Thank you

anakin87 commented 5 years ago

If you use the option split_text, the problem gets solved...

tables = camelot.read_pdf('_11032019105856.pdf',pages='11',split_text=True)

aborruso commented 5 years ago

@anakin87 thank you very much, it works