# Javascript: TXTextControl.setFormattingPrinter Method

> Sets the name of a printer the text dimensions and capabilities of which are used to format the document. If the document is printed with this printer the displayed and the printed document have the same dimensions. If the property is set to "Standard", the system installed standard printer is used to format the document. If the property is set to "Display", the font dimensions of the display device are used to format the document. If the specified printer is not installed, the standard printer is used.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.setFormattingPrinter Method
- **390 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setformattingprinter-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setformattingprinter-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setformattingprinter-method/llms-full.txt

---

### Description

Sets the name of a printer the text dimensions and capabilities of which are used to format the document. If the document is printed with this printer the displayed and the printed document have the same dimensions. If the property is set to "Standard", the system installed standard printer is used to format the document. If the property is set to "Display", the font dimensions of the display device are used to format the document. If the specified printer is not installed, the standard printer is used.

### Syntax

```javascript
<void> TXTextControl.setFormattingPrinter(<string> printerName)
```

### Parameters

| Parameter | Description |
|---|---|
| printerName | The printer name. |

### Examples

The following example demonstrates `TXTextControl.setFormattingPrinter` in a practical document-editing workflow. It sets the name of a printer the text dimensions and capabilities of which are used to format the document. If the document is printed with this printer the displayed and the printed document have the same dimensions. If the property is set to "Standard", the system installed standard printer is used to format the document. If the property is set to "Display", the font dimensions of the display device are used to format the document. If the specified printer is not installed, the standard printer is used.

```javascript
TXTextControl.setFormattingPrinter("QuarterlyReport");
```

### Remarks

This property is only relevant when using the Microsoft Windows based synchronization service. The platform independent backend does not support printer specific formatting.

---

## Nearby

- **Previous:** [Javascript: TXTextControl.setForeColor Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setforecolor-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.setFormulaReferenceStyle Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setformulareferencestyle-method/llms-full.txt)
