This project generates a PDF invoice based on user data and extracted information from a PDF file. It uses ReportLab for PDF generation, pdfplumber for text extraction, and OpenCV for bounding box updates.
- Extracts text from specific regions of a PDF using bounding boxes. (using https://github.com/arccoder/opencvdragrect?tab=readme-ov-file to handle bounding box)
- Dynamically replaces placeholders in the invoice template with user data.
- Generates a formatted PDF invoice.
- Allows visualization and updating of bounding boxes for text extraction.
- Python 3.x
- Required libraries:
reportlabpdfplumberopencv-pythontextwrap
python ./account_maker_pdf.py -h
usage: account_maker_pdf.py [-h] [--show] [--update] pdf_file
Calculate user usage and cost distribution. Example: python
./account/account_maker_pdf.py [faktura.pdf]
positional arguments:
pdf_file Path to the PDF invoice file to process
options:
-h, --help show this help message and exit
--show, -s Make a image with the bounding boxes
--update, -u Update/adapt the bounding boxes