> For the complete documentation index, see [llms.txt](https://docs.tivity.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tivity.one/building-an-application/execution/scripting/functions/qr-barcode.md).

# QR-/Barcode

## CreateBarcode

Creates a QR or bar code and returns the Document with the image. The generated barcode image can be manipulated with parameter options.

#### Syntax <a href="#pragma-line-6496" id="pragma-line-6496"></a>

```
CreateBarcode ( CodeText [, EncodeType] [, XDimension] [, YDimension] [, BarcodeColor] [, RotationAngle] )
```

#### Parameters <a href="#pragma-line-6502" id="pragma-line-6502"></a>

***CodeText***\
&#x20;The coding text of the barcode.\
&#x20;Type: String

***EncodeType*** (optional)\
&#x20;The encode type of the barcode, e.g QR, ISBN, DataMatrix, Pdf417. Default is EAN13\
&#x20;Type: String

***XDimension*** (optional)\
&#x20;The X dimension determines a barcode's density. If the X dimension is large so the barcode can hold more information, in fact the barcode is getting bigger. Default dimension is 0,6.\
&#x20;Type: Double

***YDimension*** (optional)\
&#x20;The Y dimension is to 2D barcodes what the X dimension is for linear barcodes. Default dimension is 2,0.\
&#x20;Type: Double

***BarcodeColor*** (optional)\
&#x20;The barcode color in ARGB format, e.g. '255,0,0,0' for black\
&#x20;Type: String

***RotationAngle*** (optional)\
&#x20;The rotation angle in degrees. If angle NOT equal to 90, 180, 270 or 0, it may difficulty to read the image.\
&#x20;Type: Double

#### Return Type <a href="#pragma-line-6529" id="pragma-line-6529"></a>

Document

## ReadBarcode

Analyzes a QR or bar code and returns the stored information as a string. Input Document must contain an image (supported formats).

#### Syntax <a href="#pragma-line-6538" id="pragma-line-6538"></a>

```
ReadBarcode ( Document [, DecodeBarCodeType] )
```

#### Parameters <a href="#pragma-line-6544" id="pragma-line-6544"></a>

***Document***\
&#x20;Document object containing the barcode image\
&#x20;Type: Document

***DecodeBarCodeType*** (optional)\
&#x20;Specify the type of barcode to read, e.g QR, ISBN, DataMatrix, Pdf417, Code39Standard. Default is all types.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-6555" id="pragma-line-6555"></a>

String

## &#x20;<a href="#pragma-line-6560" id="pragma-line-6560"></a>
