Contents
- Export
Having trouble getting help?
Contact Support
Contact Support
Export
4 Mar 20251 minute to read
Export barcode as an image and base64 string is common for barcode, QRCode and datamatrix.
Export
Barcode provides the support to export its content as an image in the specified image type and downloads it in the browser. The following code example shows how to export the barcode as an image
var barcode = document.getElementById("barcode").ej2_instances[0];
var filename = 'Export';
barcode.exportImage(filename,'JPG');
The filename specifies the name of the file to be downloaded.
Export As Base64String
Barcode provides the support to export its content as an image in the specified image type and returns it as base64 string. The following code example shows how to export the barcode as a base64 string,
var barcode = document.getElementById("barcode").ej2_instances[0];
await barcode.exportAsBase64Image('JPG');
NOTE
Format is to specify the type or format of the exported file. You can export the barcode to the following formats:
* JPG.
* PNG.