This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/ios/samples/pdf-reader-view.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. PDF reflow with Reader View in Swift for iOS

Show the Reader View, which reformats document text for easy reading. Get additional resources by visiting our iOS PDF reader library.


//
// Copyright © 2020-2026 PSPDFKit GmbH. All rights reserved.
//
// The Nutrient sample applications are licensed with a modified BSD license.
// Please see License for details. This notice may not be removed from this file.
//
import PSPDFKit
import PSPDFKitUI
class ReaderViewExample: Example {
override init() {
super.init()
self.contentDescription = "Shows Reader View, which reformats document text for easy reading."
self.category = .componentsExamples
self.priority = 2
}
override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
let document = AssetLoader.document(for: .cosmicContextForLife)
let controller = PDFViewController(document: document)
controller.navigationItem.rightBarButtonItems = [controller.thumbnailsButtonItem, controller.readerViewButtonItem]
return controller
}
}

This code sample is an example that illustrates how to use our SDK. Please adapt it to your specific use case.