UIKit Printing with UIPrintInteractionController and UIViewPrintFormatter
Version 2.0, 2012-12-05
Updated to use storyboards and autolayout.
(Full Revision History)
Xcode 4.5 or later, iOS 5.0 or later.
iOS 5.0 or later.
PrintWebView demonstrates how to print the content displayed by a UIWebView object using the UIViewPrintFormatter class. This sample application is a primitive web browser with printing capability.
PrintWebView shows how to: * Obtain and use the shared UIPrintInteractionController object. * Use a UIViewPrintFormatter object to handle formatting and rendering of content in a web view. * Use a custom UIPrintPageRenderer object to add a header and footer to each page along with the web view content, positioned relative to the imageable area of the paper. * Position the printed content of a web view independently of the imageable area of the paper; for example, inset by 1/2 inch from each edge.