Step 5: Add your logo¶
Labels usually carry a brand mark. Images live in their own tab and are referenced by name.
Open the IMAGES tab and upload a logo, then return to LAYOUT BUILDER.
- Add an
Imageelement. - Set X Start to
25%, X End to75%. - Set Y Start to
2%, Y End to16%. - Set Value template to
{{ images['logo.png'] }}, or use Insert Image.
The key is the image's filename, exactly as you uploaded it, so a file named
my-brand.pngis read as{{ images['my-brand.png'] }}. The square brackets are what make a filename usable as a key, since the dot in.pngwould otherwise be read as reaching into a nested value. Insert Image writes the whole thing for you.Referencing by name means one upload can be used by several elements. The image keeps its aspect ratio inside the box you gave it.
Use an image with a solid background rather than a transparent one. Transparent areas print as black, which is the single most common surprise with label images. See the logo prints as a black box.
Behind the scenes
{
"name": "Tutorial label",
"labelContentLayoutElements": [
{
"name": "Tag barcode",
"elementType": "CODE128_BARCODE",
"xStartFraction": 0.05,
"xEndFraction": 0.95,
"yStartFraction": 0.46,
"yEndFraction": 0.66,
"valueTemplate": "{{ package.label }}"
},
{
"name": "Tag number",
"elementType": "TEXT",
"xStartFraction": 0.05,
"xEndFraction": 0.95,
"yStartFraction": 0.38,
"yEndFraction": 0.45,
"valueTemplate": "{{ package.label | boldEndingDigits }}",
"paragraphFontName": "Helvetica",
"paragraphFontSize": 7,
"paragraphSpacing": 8,
"horizontalParagraphAlignment": "CENTER",
"paragraphTextResizeStrategy": "SHRINK_TEXT"
},
{
"name": "Logo",
"elementType": "IMAGE",
"xStartFraction": 0.25,
"xEndFraction": 0.75,
"yStartFraction": 0.84,
"yEndFraction": 0.98,
"valueTemplate": "{{ images['logo.png'] }}"
}
]
}
Next Steps¶
- Continue to step 6, Name the product.
- Back to step 4, Show the tag number.
- All tutorial steps