UIMarkupTextPrintFormatter Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/UIKit.framework
Availability
Available in iOS 4.2 and later.
Companion guide
Declared in
UIPrintFormatter.h

Overview

Instances of the UIMarkupTextPrintFormatter class lay out HTML markup text for a multipage print job.

To use this print formatter for a print job, create an instance of UIMarkupTextPrintFormatter initialized with the HTML, set the inherited layout properties, and add the object to the print job in one of two ways:

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

Tasks

Creating a Markup-Text Print Formatter

Getting and Setting the Markup Text

Properties

markupText

The HTML markup text for the print formatter.

@property(nonatomic, copy) NSString *markupText
Discussion

When drawing begins for the print job, you cannot change the value of this property. The delegate method printInteractionControllerWillStartJob: is called immediately before the formatting is set for the job.

Availability
  • Available in iOS 4.2 and later.
Declared In
UIPrintFormatter.h

Instance Methods

initWithMarkupText:

Returns a markup-text print formatter initialized with an HTML string.

- (id)initWithMarkupText:(NSString *)markupText
Parameters
markupText

A string of HTML markup text or nil if you want to add the markup text later.

Return Value

An instance of UIMarkupTextPrintFormatter or nil if the object could not be created.

Availability
  • Available in iOS 4.2 and later.
Declared In
UIPrintFormatter.h