QRCodeGeneratorComponent
23 Sep 20252 minutes to read
QRCode Component
<ej-qrcode-generator></ej-qrcode-generator>Properties
backgroundColor string
Defines the background color of the QR code.
Defaults to ‘white’
displayText DisplayTextModel
Defines the text properties for the QR code.
Defaults to ’’
enablePersistence boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
enableRtl boolean
Enable or disable rendering component in right to left direction.
Defaults to false
errorCorrectionLevel ErrorCorrectionLevel
Defines the error correction level of the QR code.
Defaults to undefined
foreColor string
Defines the forecolor of the QR code.
Defaults to ‘black’
height string|number
Defines the height of the QR code model.
Defaults to ‘100%’
locale string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ’’
logo QRCodeLogoModel
Specifies the logo overlay configuration for the QR code.
Defaults to ’’
margin MarginModel
Defines the margin properties for the QR code.
Defaults to ’’
mode RenderingMode
Defines the QR code rendering mode.
- SVG - Renders the bar-code objects as SVG elements
- Canvas - Renders the bar-code in a canvas
Defaults to ‘SVG’
value string
Defines the type of barcode to be rendered.
Defaults to undefined
version QRCodeVersion
- Defines the version of the QR code.
Defaults to undefined
width string|number
Defines the width of the QR code model.
Defaults to ‘100%’
xDimension number
Defines the xDimension of the QR code model.
Methods
destroy
It is used to destroy the Barcode component.
Returns void
exportAsBase64Image
Export the barcode as an image in the specified image type and returns it as base64 string.
| Parameter | Type | Description |
|---|---|---|
| barcodeExportType | BarcodeExportType |
Defines the format of the barcode to be exported |
Returns Promise
exportImage
Export the barcode as an image in the specified image type and downloads it in the browser.
| Parameter | Type | Description |
|---|---|---|
| filename | string |
Specifies the filename of the barcode image to be download. |
| barcodeExportType | BarcodeExportType |
Defines the format of the barcode to be exported |
Returns void
getModuleName
Returns the module name of the barcode
Returns string
getPersistData
Get the properties to be maintained in the persisted state.
Returns string
render
Renders the barcode control .
Returns void