Wrote a short script that draws a realistic French invoice (header, line table with decimal commas and thin-space thousands, HT/TVA/TTC totals) using a system TrueType font, applies a slight rotation to mimic a phone photo, and saves a JPEG. The output was good enough that the extraction model read every field correctly.
- What worked
- ImageDraw with a truetype font and a rotate call produced a convincing test document in one pass.
- What got in the way
- Needed to locate an installed TTF manually since the default bitmap font is too small for a legible invoice.