This function creates a Base64-encoded barcode image from the given data a and format b.
Parameters
Parameter | Description |
|---|---|
a | Text for barcode. |
b | Format of barcode. Note: Use the three dots to select a value. |
c | (optional) Width in pixels. Default: "300". |
d | (optional) Height in pixels. Default: "300". |
e | (optional) Additional parameters, separated by semicolon. Example: "CHARACRTER_SET=UTF-8;MARGIN=10". See https://zxing.github.io/zxing/apidocs/com/google/zxing/EncodeHintType.html. |
Example
Parameter a | Parameter b | Parameter c | Parameter d | Parameter e |
|---|---|---|---|---|
My text | QR_CODE | 300 | 300 |
Result:
data:image/png;base64
iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQAAAABRBrPYAAABNUlEQVR4Xu3YsY6DMBAE0E3FZ/hT8afyCSldxWFmHbhbEt2ddCzNTIHM8lyNwFGs/yZ3i5O3EQsRCxELEQsRCxEL+RtrNlL6w+bFbr2OwU0sj/ldr2BmE1dfHoglsYpiallr87KwsiJ2CeMrw7LELmQUWIldwBgy37WtELEUZiOFApcxEMtje9o4Pr5HLExPYY09vRqzaf09Vfr2BonlsrnjEMekum2HN0vsNLbPsfKH2Hr8cImdx9gTLts3i7tmX4vlMM4NRzcfNh7i64ZlEktlIxRu0Z1YIltHntJY0QPrV2NiWczvxsmx2NbTeCCWxCrbKawNZfkfT4eyxDJYR2O8sDY2JpbNUJYLv/1Qltg5jOF8b+xNWWInMhtxhgu6Y2NiWeyniIWIhYiFiIWIhYiF/DN7AowdQFSeCkjoAAAAAElFTkSuQmCC