<!--
{
  "availability" : [
    "iOS: 4.2.0 -",
    "iPadOS: 4.2.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISimpleTextPrintFormatter",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISimpleTextPrintFormatter"
  },
  "title" : "UISimpleTextPrintFormatter"
}
-->

# UISimpleTextPrintFormatter

An object that lays out plain text for printing, possibly over multiple pages.

```
class UISimpleTextPrintFormatter
```

## Overview

The [`UISimpleTextPrintFormatter`](/documentation/UIKit/UISimpleTextPrintFormatter) class allows you to specify global font, color, and text alignment properties for the printed text. To use this print formatter for a print job, create an instance of [`UISimpleTextPrintFormatter`](/documentation/UIKit/UISimpleTextPrintFormatter) initialized with the text, set the text properties and the inherited layout properties, and add the object to the print job in one of two ways:

- If a single print formatter is being used for the print job (with no additional drawing), assign it to the [`printFormatter`](/documentation/UIKit/UIPrintInteractionController/printFormatter) property of the [`UIPrintInteractionController`](/documentation/UIKit/UIPrintInteractionController) shared instance. The inherited [`startPage`](/documentation/UIKit/UIPrintFormatter/startPage) property identifies the beginning page of content with which the formatter is associated.
- If you are using multiple formatters along with a page renderer, associate each print formatter with a starting page of the printed content. You often take this approach when you want to add content such as headers and footers to what the formatters provide. You have two ways of associating a print formatter with a  [`UIPrintPageRenderer`](/documentation/UIKit/UIPrintPageRenderer) object:
- You can add print formatters to the [`printFormatters`](/documentation/UIKit/UIPrintPageRenderer/printFormatters) property of the [`UIPrintPageRenderer`](/documentation/UIKit/UIPrintPageRenderer) object; the [`startPage`](/documentation/UIKit/UIPrintFormatter/startPage) property of the print formatter specifies the starting page.
- You can add print formatters by calling [`addPrintFormatter(_:startingAtPageAt:)`](/documentation/UIKit/UIPrintPageRenderer/addPrintFormatter(_:startingAtPageAt:)) for each print formatter; the second parameter of this method specifies the starting page (and overrides any [`startPage`](/documentation/UIKit/UIPrintFormatter/startPage) value).

You can change the text at any time before drawing of the printable content begins. You cannot change the text after drawing begins.

## Topics

### Creating a simple-text print formatter

[`init(attributedText:)`](/documentation/UIKit/UISimpleTextPrintFormatter/init(attributedText:))

Returns a simple-text print formatter initialized with attributed text.

[`init(text:)`](/documentation/UIKit/UISimpleTextPrintFormatter/init(text:))

Returns a simple-text print formatter initialized with plain text.

### Getting and setting the text

[`attributedText`](/documentation/UIKit/UISimpleTextPrintFormatter/attributedText)

A string of attributed text.

[`text`](/documentation/UIKit/UISimpleTextPrintFormatter/text)

A string of plain text.

### Text attributes for printed content

[`font`](/documentation/UIKit/UISimpleTextPrintFormatter/font)

The font of the printed text.

[`color`](/documentation/UIKit/UISimpleTextPrintFormatter/color)

The color of the printed text.

[`textAlignment`](/documentation/UIKit/UISimpleTextPrintFormatter/textAlignment)

The alignment of the printed text.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)