Print e-invoice details on custom print format

how do i print this e-invoice transaction details in my personal custom print format. Editing the e-invoice format doesnt work.

Pls. review relevant Github issue:


Please post full traceback (copy error to clipboard).

Copy error to clipboard doesnt work.

does this help

pls help how to print the transaction detail like irn, ack. no. etc. above code only print qrcode.


You can refer to the below link:

Also, You can refer to the current implementation:


Thanks perfectly working.

I tried using the below HTML tag (copied from docs) and still getting the same error-

<img src="data:image/png;base64,{{ get_qr_code(einvoice.signed_qr_code, scale=2) }}" class="qrcode">


Stack trace is below-

Traceback (most recent call last):
File “apps/frappe/frappe/”, line 95, in application
response = frappe.api.handle()
File “apps/frappe/frappe/”, line 55, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/”, line 47, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/”, line 85, in execute_cmd
return, **frappe.form_dict)
File “apps/frappe/frappe/”, line 1603, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/”, line 189, in set_value
File “apps/frappe/frappe/model/”, line 305, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/”, line 340, in _save
File “apps/frappe/frappe/model/”, line 1029, in run_before_save_methods
File “apps/frappe/frappe/model/”, line 899, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/”, line 1251, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/”, line 1233, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/”, line 896, in fn
return method_object(args, *kwargs)
File “apps/frappe/frappe/printing/doctype/print_format/”, line 40, in validate
File “apps/frappe/frappe/printing/doctype/print_format/”, line 64, in extract_images
df[“options”] = extract_images_from_html(self, df[“options”])
File “apps/frappe/frappe/core/doctype/file/”, line 270, in extract_images_from_html
content = re.sub(r’<img[^>]src\s=\s
?)[“']', _save_file, content)
File “/usr/lib/python3.10/”, line 209, in sub
return _compile(pattern, flags).sub(repl, string, count)
File “apps/frappe/frappe/core/doctype/file/”, line 227, in _save_file
headers, content = data.split(”,")
ValueError: too many values to unpack (expected 2)

@amrit-citrusleaf ,Try This: {{ web_block(‘E-Invoice QR Code’, values={‘qr_text’: e_invoice_log.signed_qr_code }) }}

@Krishn - apologies for the late reply but I am getting this error when using web_block-

I got it working. Need to follow the exact steps as given on Guide to Add e-Invoice QR Code in Print Formats | India Compliance