Use Google Drive and the Google Execution API for generating PDF invoices
You may want to read a description here: https://tomassetti.me/google-drive-automation-with-google-execution-api-filling-templates-programmatically-and-download-pdf-version/