Some test text!

menu

View mode

There are a few view modes which can be adjusted to provide an optimal presentation such as layout, fit, or reflow.

Reflow

Reflow makes the document more flexible and easier to read, especially on small devices. PDFTron is able to extract the reflowable layout of each page of a PDF document as an HTML file. In this guide, we explain how simple it is to show a widget that allows the user to swipe left or right through the pages of the document to see reflowable document pages.

The PTReflowViewController class allows the user to flip left and right through the reflowable layout of pages in a certain PDF document.

Reflow

The reflow control is part of the Tools library, so make sure you have added the Tools library to your project.

linkShow a reflow view controller

To create a new reflow view controller instance and display it from another view controller, supply a PTPDFViewCtrl instance to the PTReflowViewController designated initializer:

// Initialize reflow view controller with a PTPDFViewCtrl instance.
let reflowViewController = PTReflowViewController(pdfViewCtrl: pdfViewCtrl)

// Set the current view controller as the reflow view controller's delegate.
reflowViewController.delegate = self

let navigationController = UINavigationController(rootViewController: reflowViewController)
self.present(navigationController, animated: true, completion: nil)

That is everything you need to have a simple reflow control. Next, we will go through advanced features.

linkCustomization

It is possible to change the scale of text in the reflow view controller. The default text scale is 1.0 and can be changed with the scale property.

Similar to the PDFViewCtrl, tapping on the left or right edge of the reflow view controller can change the page. This behavior is disabled by default and can be enabled with the turnPageOnTap property.

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.