I'm tring to fill a pdf with information from a dictionary. When i run the following code:
fields = {'zeitraum': getMonth(month), 'arzt': doc.name, 'rechnungsnr': verrechnungsNr, 'verrechnungsbasis': total['verrechnungsbasis'],
'marketing': total['marketing'], 'dauer': str(total['dauer'])+" min.", 'miete': total['miete'], 'geraeteaufwand': total['geraet'],
'labor': total['labor'], 'material': total['material'], 'materialust': materialust, 'mwst':mwst, 'gesamt': gesamt}
result = pypdftk.fill_form('/assets/docs/sf_rechnung_arzt.pdf', fields)
return FileResponse(result, as_attachment=True, filename='output.pdf')
i get the following error:
subprocess.CalledProcessError: Command 'pdftk /assets/docs/sf_rechnung_arzt.pdf fill_form C:\Users\pataki\AppData\Local\Temp\2\tmpyf2o6cgc output C:\Users\pataki\AppData\Lo
cal\Temp\2\tmpqqolt1_3 flatten' returned non-zero exit status 1.
And I can't figure out what's wrong. Does anyone have hints? Thanks!
Well most probably bcs the pdftk commandline tool is not installed. 🤷🏻♂️