> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/printer/formattocpcl.md).

# formatToCPCL

## Description

Formats a text to CPCL printer language.

## Input / Parameter

| Name | Description        | Input Type  | Default | Options | Required |
| ---- | ------------------ | ----------- | ------- | ------- | -------- |
| text | The text to print. | String/Text | -       | -       | Yes      |

## Output

N/A

## Callback

N/A

## Video

Coming Soon.

## Example

The user wants to format the text to print to CPCL printer language.

### Steps

1. Set a variable `vPrint` using `setVar` function.

   ![](/files/o7MhbuS7KS9yBScnsMVn)

   ![](/files/1cGdoI29yyXlrsyY3yek)
2. Call the function `btPrinterPrint`. Call the function `formatToCPCL` in the `text` parameter of the function to convert the text to CPCL format for printing.

   ![](/files/NHnkmCq6aLakyNCRSFtw)

   ![](/files/6NK0P9pG6xXVDXkqf9BF)

### Result

1. The text formatted to CPCL will be printed.

   ![](/files/59D4nM2txqKPJcSZTduI)

## Links
