Reader View

Reader View presents the content of PDF documents in an easy-to-read, single-column view that’s optimized for mobile devices. It’s especially helpful for documents such as magazines, books, articles, and scientific papers.

Reader View only shows the textual content of a given PDF document. It also looks for headings and displays them bigger and/or bolder. All other elements — such as images, stylized page parts, and page headers and footers — are ignored in order to provide an improved reading flow. It also supports Dark Mode and Apple’s Dynamic Type feature, the latter of which scales fonts automatically and chooses a user’s preferred text size.

Reader View tries to structure the text in the intended reading order. If you find documents where this isn’t the case and are able to share them, please let us know.

Normal View
Reader View

Reader View is still in its early stages, so if you have any feedback on how we could improve upon it, please contact us.

ℹ️ Note: To use Reader View, you need to have the Reader View component enabled in your license.

How to Use Reader View

The easiest way to try out Reader View is to check out ReaderViewExample.swift. You can do this by searching for Reader View in our PSPDFKit Catalog example project.

The quickest way to add Reader View to your app is to add your PDFViewController’s readerViewButtonItem to your navigation bar or toolbar. Users can tap this button to show the currently loaded document in Reader View. Alternatively, Reader View can be presented using the ReaderViewController class.

Here’s an example of how to add the Reader View button to the navigation bar:

pdfViewController.navigationItem.rightBarButtonItem = pdfViewController.readerViewButtonItem
pdfViewController.navigationItem.rightBarButtonItem = pdfViewController.readerViewButtonItem;

If you want to present Reader View programmatically, you can do it like this:

// Create the `Document` you want to view in Reader View.
let fileURL = Bundle.main.url(forResource: "Document", withExtension: "pdf")!
let document = Document(url: fileURL)

// Create the `ReaderViewController`.
let readerViewcontroller = ReaderViewController(document: document)

// Present the `ReaderViewController` within a `UINavigationController` to enable the navigation bar.
present(UINavigationController(rootViewController: readerViewController), animated: true)
// Create the `PSPDFDocument` you want to view in Reader View.
NSURL *documentURL = [NSBundle.mainBundle URLForResource:@"Document" withExtension:@"pdf"];
PSPDFDocument *document = [[PSPDFDocument alloc] initWithURL:documentURL];

// Create the `PSPDFReaderViewController`.
PSPDFViewController *readerViewController = [[PSPDFViewController alloc] initWithDocument:document];

// Present the `PSPDFReaderViewController` within a `UINavigationController` to enable the navigation bar.
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:readerViewController];
[self presentViewController:navController animated:YES completion:NULL];

Please note that ReaderViewController does not support being created from a storyboard or Interface Builder archive.