Embed images into invoice templates
Zuora now supports embedding images in addition to barcodes into invoice files. To achieve this, you can add a custom merge field with size specified to any invoice template.
Use the following format for your custom image merge field:
{ MERGEFIELD Image:{Merge field} \d\* HxW in (inches/pixels) }
For example:
{ MERGEFIELD Image:Invoice.qrCode_c \d\* 50x50 px }
Embed images into invoices
To embed an image into an invoice file, perform the following steps:
- Create a custom field for an object the supports custom fields, for example, the Account object.
- Add the custom image merge filed to the invoice template.
- When creating a customer account, specify a valid image URL for the custom image merge field.
- Generate PDF or Word files for an invoice.
Example
The following merge field example will return an image in the invoice PDF or Word file.
Example invoice template:
Returned example invoice file:
Limitations
When you embed images in addition to barcodes into invoice templates, pay attention to the following limitations.
- A maximum of two images can be embedded into each template.
- The maximum size of each image to be embedded cannot exceed 2 MB. If an oversized image is embedded into an invoice template, no PDF or Word files are generated.
- Unstable network conditions might cause a timeout when fetching external images. In this situation, no PDF or Word files are generated.
- If the URL of the external image to be embedded is invalid, no PDF or Word files are generated.