# Javascript: TXTextControl.getFormattingPrinter Method

> Returns the name of the currently selected formatting printer by calling a provided callback function. For more information on the formatting printer see function setFormattingPrinter.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.getFormattingPrinter Method
- **337 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getformattingprinter-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getformattingprinter-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getformattingprinter-method/llms-full.txt

---

### Description

Returns the name of the currently selected formatting printer by calling a provided callback function. For more information on the formatting printer see function [setFormattingPrinter](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/setformattingprinter-method/llms-full.txt).

### Syntax

```javascript
<void> TXTextControl.getFormattingPrinter(<RequestStringCallback> callback)
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Is called with the name of the currently selected formatting printer as soon as the information has been retrieved from the server. |

### Examples

The following example demonstrates `TXTextControl.getFormattingPrinter` in a practical document-editing workflow. It returns the name of the currently selected formatting printer by calling a provided callback function. For more information on the formatting printer see function setFormattingPrinter.

```javascript
TXTextControl.getFormattingPrinter(
    function(result) {
        console.log("get formatting printer result:", result);
    }
);
```

### 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.getForeColor Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getforecolor-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getFormulaReferenceStyle Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/getformulareferencestyle-method/llms-full.txt)
