Back to Website
Show / Hide Table of Contents

Interface IBarcodeItemData

A structure defining the default parameters of barcodes.

Inheritance
IImageItemData<TOverlayEffect>
IBarcodeItemData
Package: @aurigma/design-atoms-interfaces
Examples

The following example illustrates how you can enable two buttons in the Toolbox: the first one opens the standard **QrCode** dialog box, while the second custom button adds a predefined QR code to the canvas.

{
   "widgets": {
       "Toolbox": {
           "buttons": [
               "QrCode",
               {
                   "action": "CustomBarcode",
                   "iconClass": "cc-icon-qr-code",
                   "itemConfig": {
                       "barcodeContent": {
                           "barcodeFormat": "QrUrl",
                           "url": "example.com"
                       },
                       "name": "Custom barcode",
                       "color": "rgb(255,0,0)",
                       "width": "100",
                       "location": {
                           "originX": "left",
                           "originY": "bottom",
                           "x": "0%",
                           "y": "100%"
                       },
                       "barcodeOptions": {
                           "margin": 0
                       },
                       "manipulationPermissions": {
                           "allowMoveHorizontal": false,
                           "allowMoveVertical": false,
                           "resizeGrips": {
                               "edge": false,
                               "corner": []
                           }
                       }
                   }
               }
           ]
       }
   }
}

Properties

barcodeContent

The content of barcodes.

Declaration
barcodeContent?: BarcodeContentType<TBarcodeFormat, TBarcodeSubType>;
Property Value
Type Description
BarcodeContentType<TBarcodeFormat, TBarcodeSubType>

The content of barcodes.

barcodeOptions

Defines encoding options.

Declaration
barcodeOptions?: IBarcodeOptions;
Property Value
Type Description
IBarcodeOptions

Defines encoding options.

barcodePermissions

Defines permissions for barcodes.

Declaration
barcodePermissions?: IBarcodePermissionsData;
Property Value
Type Description
IBarcodePermissionsData

Defines permissions for barcodes.

color

Defines the barcode color. The default value is "rgb(0, 0, 0)".

Declaration
color?: string;
Property Value
Type Description
string

Defines the barcode color. The default value is "rgb(0, 0, 0)".

Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback