# Draw Bar Code

> Kalipso 5.0 documentation · https://doc.sysdevmobile.com/kalipso/5.0/developing/form/actions/actions-description/group-controls/draw-bar-code

Draw a bar code on a file or on a draw control. This action also allows user to know the width of a specified bar code.

Action available for the following operating systems:

-d4a54d199c0ad0f6bafe31121399c7f2.png)

### Parameters

* **Data** _\<string> -_ Data to be associated to the bar code.
* **Bar Code Type** _\<unquoted string> -_ The type of the bar code. There are several bar code types possible: _COD128_, _CODE39_, _CODE93_, _I2OF5_, _RATIONALCODABAR_, _PDF417_, _Data Matrix_, _QR Code_, _EAN13, Data Matrix Rectangular, EAN128_ or dynamic.
* **Narrow Bar width** _\<numeric> -_ The width of the narrow bar of the bar code specified.
* **Ratio** _\<numeric> -_ The ratio of the bar code specified.
* **Mode** _\<unquoted string> -_ The mode to draw the bar code. There are three possible options for this parameter: _Get Width_, _Draw to 'Draw' Control_ or _Draw to File_.
  * **Get Width** -  _Target Width_: control or variable to save the width of specified control.
  * **Draw to 'Draw' Control**
    * _Target Width:_ control or variable to save the width of specified control.
    * _Draw Control_: the control where the draw is done.
    * _X:_ the X coordinate where the draw of bar code begins.
    * _Y:_ the Y coordinate where the draw of bar code begins.
    * _Height_: the Height of the bar code to be drawed.
  * **Draw to File**
    * _Target Width:_ control or variable to save the width of specified control.
    * _X:_ the X coordinate where the draw of bar code begins.
    * _Y:_ the Y coordinate where the draw of bar code begins.
    * _Height_: the Height of the bar code to be drawed.
    * _File_: the complete path and name to the file.
    * _Format_: the type of format of the saved file.
    * _Width_: the width of the file.
    * _Height_: the height of the file.

:::info
The parameter _ratio_ are unavailable to modify in certain bar code types.
:::

:::info
Set _**Width**_ and _**Height**_ in Draw to File to _0_, for automatic management.
:::

:::info
There are several formats available (to parameter Format): Auto, JPG (.jpeg), BMP (.bmp), GIF (.gif) or PCX (.pcx).
:::
