Extract data from scanned bill documents into usable details.
Supported Bills
Installation
npm install @cityssm/bill-data-extract
Usage
import { extractEnbridgeBillData } from '@cityssm/bill-data-extract/enbridge.js'
const billData = await extractEnbridgeBillData('path/to/enbridgeBill.pdf')
console.log(billData)
How Does It Work?
The extractor takes a bill as input, either as an image or as a PDF.
"Zones" are identified within the bill to identify where the key details are.
Using tesseract.js on those zones,
data is extracted and returned as a Javascript object.
💡 Note that while scanned copies of bills are oftentimes supported,
the best source is a bill downloaded directly from the utility company.