You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option for get_invoice_as_pdf to return the PDF as bytes #55
Hi, it would be really useful for us if accounting_api.get_invoice_as_pdf could return the PDF as bytes, instead of saving the file to /tmp/. At the moment our code looks roughly like:
filepath = accounting_api.get_invoice_as_pdf(tenant_id, invoice_id=uuid)
with open(filepath, 'rb') as f:
pdf_bytes = f.read()
os.remove(filepath)
return pdf_bytes
And would be nice if we could instead do something like:
Activity
deepgandhi commentedon Feb 4, 2022
it would be helpful if i know the location of the file in which this code is written.
PeterJointAU commentedon May 17, 2022
It would be also nice if we could instruct the function where to drop the file. Ie:
accounting_api.get_invoice_as_pdf(tenant_id, invoice_id=uuid, filename='/var/www/html/myapp/invoices/inv123.pdf')vncntk commentedon Dec 1, 2025
Is there a new feature for this?