PTReflowViewController


@interface PTReflowViewController
    : UIViewController <PTOverridable, UIPageViewControllerDelegate,
                        UIPageViewControllerDataSource,
                        PTReflowSettingsViewControllerDelegate>

Displays reflowed page content from a PDF document.

  • Initializes a newly created reflow view controller that scrolls horizontally.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:
        (nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    init(pdfViewCtrl: PTPDFViewCtrl)

    Parameters

    pdfViewCtrl

    the PDFViewCtrl instance that the control coordinates with

    Return Value

    The initialized reflow view controller.

  • Initializes a newly created reflow view controller that scrolls horizontally.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
                                withToolManager:
                                    (nonnull PTToolManager *)toolManager;

    Swift

    convenience init(pdfViewCtrl: PTPDFViewCtrl, with toolManager: PTToolManager)

    Parameters

    pdfViewCtrl

    the PDFViewCtrl instance that the control coordinates with

    toolManager

    An instance of PTToolManager.

    Return Value

    The initialized reflow view controller.

  • Initializes a newly created reflow view controller.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
                             scrollingDirection:
                                 (PTReflowViewControllerScrollingDirection)
                                     scrollingDirection;

    Swift

    convenience init(pdfViewCtrl: PTPDFViewCtrl, scrollingDirection: PTReflowViewControllerScrollingDirection)

    Parameters

    pdfViewCtrl

    the PDFViewCtrl instance that the control coordinates with

    scrollingDirection

    the scrolling direction of the reflow view controller

    Return Value

    The initialized reflow view controller.

  • Initializes a newly created reflow view controller.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
                    reflowAnnotationToolsHidden:(BOOL)reflowAnnotationToolHidden;

    Swift

    convenience init(pdfViewCtrl: PTPDFViewCtrl, reflowAnnotationToolsHidden reflowAnnotationToolHidden: Bool)

    Parameters

    pdfViewCtrl

    the PDFViewCtrl instance that the control coordinates with

    reflowAnnotationToolHidden

    whether annotation tool is hidden on the reflow view controller

    Return Value

    The initialized reflow view controller.

  • The delegate object.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTReflowViewControllerDelegate> delegate;

    Swift

    weak var delegate: (any PTReflowViewControllerDelegate)? { get set }
  • The manager that handles reflow requests and results, as well as caching the results.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) PTReflowManager *_Nonnull reflowManager;

    Swift

    var reflowManager: PTReflowManager { get }
  • The scrolling direction of the reflow view controller. The default value is PTReflowViewControllerScrollingDirectionAutomatic.

    Declaration

    Objective-C

    @property (nonatomic) PTReflowViewControllerScrollingDirection scrollingDirection;

    Swift

    var scrollingDirection: PTReflowViewControllerScrollingDirection { get set }
  • The UIPageViewController used to show each page of reflowed content.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIPageViewController *_Nonnull pageViewController;

    Swift

    var pageViewController: UIPageViewController { get }
  • The current page number. This is initially set to the provided PTPDFViewCtrl‘s current page.

    Declaration

    Objective-C

    @property (nonatomic) int pageNumber;

    Swift

    var pageNumber: Int32 { get set }
  • Sets the current page number of the reflow view controller.

    Declaration

    Objective-C

    - (void)setPageNumber:(int)pageNumber animated:(BOOL)animated;

    Swift

    func setPageNumber(_ pageNumber: Int32, animated: Bool)

    Parameters

    pageNumber

    the new page number

    animated

    whether to animate the change in page number

  • Update the settings of the reflow view controller.

    Declaration

    Objective-C

    - (void)updateSettings;

    Swift

    func updateSettings()
  • The scale factor for the reflowed text content. The default value is 1.0.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat scale;

    Swift

    var scale: CGFloat { get set }
  • Whether tapping on the edge of a page changes the page. The default value is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL turnPageOnTap;

    Swift

    var turnPageOnTap: Bool { get set }
  • How to reflow the PDF content. The default value is PTReflowModeTextAndRawImages.

    Declaration

    Objective-C

    @property (nonatomic) PTReflowMode reflowMode;

    Swift

    var reflowMode: PTReflowMode { get set }
  • Overrides the font to use for reflowed content.

    If this property is nil, the default PDF font will be used.

    WARNING: If the original PDF has incorrect unicode, changing the font will render the PDF unreadable, so use of this property for PDFs where the Unicode correctness cannot be guaranteed is not recommended.

    The default value of this property is nil.

    Note

    This property only has effect when reflowMode is set to PTReflowModeTextAndRawImages.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *fontOverrideName;

    Swift

    var fontOverrideName: String? { get set }
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init PT_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil PT_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithCoder:(NSCoder *)aDecoder PT_UNAVAILABLE;