---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# TemplatePrinter - Scoped

# TemplatePrinter - Scoped {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The TemplatePrinter API provides methods to handle printing from a mail script to the email message.

There is no constructor for this API. The methods are called in mail scripts using the template global variable.

## TemplatePrinter - print(String string) {#ariaid-title2}

Prints the string to the email body.
{#r_TPS-print_S__table_cnv_rdy_nt__entry__3}

| Name | Type | Description |
|-|-|-|
| string | String | String to print. |
[Table 1. Parameters]

{#r_TPS-print_S__table_cnv_rdy_nt} {#r_TPS-print_S__table_dnv_rdy_nt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 2. Returns]

{#r_TPS-print_S__table_dnv_rdy_nt}  

    template.print("Incident number - " + current.number + "\n");

## TemplatePrinter - space(Number spaces) {#ariaid-title3}

Adds non-breaking spaces to the email body.
{#r_TPS-space_N__table_pys_c2y_nt__entry__3}

| Name | Type | Description |
|-|-|-|
| spaces | Number | Number of non-breaking spaces to output to the email body. |
[Table 3. Parameters]

{#r_TPS-space_N__table_pys_c2y_nt} {#r_TPS-space_N__table_qys_c2y_nt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 4. Returns]

{#r_TPS-space_N__table_qys_c2y_nt}  

    template.space(4);


