I used a similar method until I realized my data wasn't very accessible afterwards. When I needed an anual report I had to write a small script, then for taxes, then for repeating customers, and so on. I also had to go and look customer data to an old invoice and copy that when the customer repeats. All this was error prone and not architected with care.
I moved to a simple invoicing app and most of my problems were gone. I miss the command line a bit, that's all. Just my experience.
The invoice data from my hledger file and a HTML template together are generated to a HTML invoice. The HTML invoice together with a CSS file are processed to PDF using WeasyPrint [1].
ledger-cli is great, but I'd strongly encourage using an older 2.6 release. The 3.x releases don't forecast accurately for me and the 3.x code is (a complex and disturbingly unreadable) complete rewrite of 2.x.
I moved to a simple invoicing app and most of my problems were gone. I miss the command line a bit, that's all. Just my experience.