Save Barcode as PNG
save generated barcodes as png image attachments linked to the current record these images can be used in email templates, apex code, or other applications how it works the component automatically saves the generated barcode as a png file whenever the code renders successfully on the page the saved images are attached to the record and can be accessed from the files related list key aspects the code must render correctly on the page to be saved the image is generated client side; there is no full backend generation you can use the scale parameter in the component to adjust the size of the generated image a higher scale value results in a larger image by default, the component renders codes with a transparent background however, when saving as png, the background is set to white to ensure the code displays correctly in various contexts, such as emails with different background colors if you edit the field being encoded (e g , change an email address), the component will rerender and save a new png file automatically file naming convention saved files are named using the pattern {code type} {text} png , where code type is the type of code (e g , qrcode , code128 ) text is the value being encoded (e g , a hardcoded text value, a field value, or the record id) enable functionality this feature is disabled by default to enable it, you must edit the lightning page in the lightning app builder and activate it using the corresponding checkbox open the lightning app builder by navigating to setup > lightning app builder select the lightning page where the code component is placed in the page editor, locate the code component in the component's properties panel, check the save as png box click save to apply the changes to the page once enabled, the component will save the generated code as a png attachment to the record each time the code renders successfully