title: How to extract data from invoices in tabular format
body: <p>I'm trying to extract data from pdf/image invoices using computer vision.For that i used ocr based pytesseract.
  this is sample invoice
  <a href="https://i.stack.imgur.com/aF0Dc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aF0Dc.jpg" alt="enter image description here" /></a>
  you can find code for same below</p>
  <pre><code>import pytesseract
  
  
  img = Image.open(&quot;invoice-sample.jpg&quot;)
  
  text = pytesseract.image_to_string(img)
  
  print(text)
  </code></pre>
  <p>by using pytesseract i got below output</p>
  <pre><code>http://mrsinvoice.com
  
   
  
  ’ Invoice
  
  Your Company LLC Address 123, State, My Country P 111-222-333, F 111-222-334
  
  
  BILLTO:
  
  fofin Oe Invoice # 00001
  
  Alpha Bravo Road 33 Invoice Date 32/12/2001
  
  P: 111-292-333, F: 111-222-334
  
  client@example.net Nomecof Reps Bob
  Contact Phone 101-102-103
  
  SHIPPING TO:
  
  eine ce Payment Terms ash on Delivery
  
  Office Road 38
  P: 111-333-222, F: 122-222-334 Amount Due: $4,170
  office@example.net
  
  NO PRODUCTS / SERVICE QUANTITY / RATE / UNIT AMOUNT
  HOURS: PRICE
  
  1 tye 2 $20 $40
  
  2__| Steering Wheel 5 $10 $50
  
  3 | Engine oil 10 $15 $150
  
  4 | Brake Pad 24 $1000 $2,400
  
  Subtotal $275
  
  Tax (10%) $27.5
  
  Grand Total $202.5
  
  ‘THANK YOU FOR YOUR BUSINESS
  </code></pre>
  <p>but problem is i want to extract text and segregate it into different parts like Vendor name, Invoice number, item name and item quantity.
  expected output</p>
  <pre><code>{'date': (2014, 6, 4), 'invoice_number': 'EUVINS1-OF5-DE-120725895', 'amount': 35.24, 'desc': 'Invoice EUVINS1-OF5-DE-120725895 from Amazon EU'}
  </code></pre>
  <p>I also tried <code>invoice2data</code> python library but again it has many limitation. I also tried regex and opencv's canny edge detection for detecting text boxes separately but failed to achieve the expected outcome</p>
  <p>could you guys please help me</p>