You pull a table out of a PDF, load it into your script, and the total is off by 1,200. No error, no warning. The extractor did exactly what it was told. The numbers are just wrong.
Here is a six-row example of what extraction can hand you:
rows = [ [ " Item " , " Qty " , " Amount " ], [ " Hosting " , " 1 " , " 1,200.00 " ], [ " Support " , " 2 " , " (300.00) " ], # negative in parentheses [ " Domain " , " 1 " , " 15.00 " ], [ " Item " , " Qty " , " Amount " ], # header repeated: a page break leaked in [ " Backup " , " 1 " , " 80.00 " , " x " ], # ragged row: shifted column [ " Total " , "" , " 995.00 " ], ]
Enter fullscreen mode
Exit fullscreen mode
Libraries such as pdfplumber give you rows like these. They do not tell you whether the rows are trustworthy.…