PTReflowManager

@interface PTReflowManager : NSObject

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

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

/**
 * 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 in the general case is not recommended.
 *
 * The default value of this property is `nil`.
 *
 * @note This property only has effect when `reflowMode` is set to `PTReflowModeTextAndRawImages`.
 */
@property (nonatomic, copy) NSString* fontOverrideName;

@property (nonatomic, assign) PTReflowMode reflowMode;

/**
 * `true` if annotation is disabled; `false` otherwise. Default is `false`.
 */
@property (nonatomic, assign) BOOL annotationToolsHidden;

/**
 * `true` if any images should be included; `false` otherwise. Default is `true`.
 */
@property (nonatomic, assign) BOOL includeImages;

/**
 * `true` if background images should be hidden; `false` otherwise. Default is `false`.
 */
@property (nonatomic, assign) BOOL hideBackgroundImages;

/**
 * `true` if images should be hidden under text; `false` otherwise. Default is `false`.
 */
@property (nonatomic, assign) BOOL hideImagesUnderText;

/**
 * `true` if images should be hidden under invisible text; `false` otherwise. Default is `false`.
 */
@property (nonatomic, assign) BOOL hideImagesUnderInvisibleText;

/**
 * `true` if text should not reflow over images; `false` otherwise. Default is `false`.
 */
@property (nonatomic, assign) BOOL doNotReflowTextOverImages;

/**
 * `true` if can create annotation; `false` otherwise. Default is `true`.
 * This property will be ignored if `annotationToolsHidden` is `true`.
 */
@property (nonatomic, assign) BOOL annotationModeEnabled;

- (void)requestReflowForPageNumber:(int)pageNumber;

- (void)clearCache;

- (int)pageNumberForReflowFile:(NSURL *)reflowFile;



PT_INIT_UNAVAILABLE

@end

Undocumented

  • Undocumented

    Declaration

    Objective-C

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

    Swift

    init(pdfViewCtrl: PTPDFViewCtrl)
  • Undocumented

    Declaration

    Objective-C

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

    Swift

    weak var delegate: (any PTReflowManagerDelegate)? { 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 in the general case 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) NSString *_Nonnull fontOverrideName;

    Swift

    var fontOverrideName: String { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) PTReflowMode reflowMode

    Swift

    var reflowMode: PTReflowMode { get set }
  • true if annotation is disabled; false otherwise. Default is false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL annotationToolsHidden;

    Swift

    var annotationToolsHidden: Bool { get set }
  • true if any images should be included; false otherwise. Default is true.

    Declaration

    Objective-C

    @property (nonatomic) BOOL includeImages;

    Swift

    var includeImages: Bool { get set }
  • true if background images should be hidden; false otherwise. Default is false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL hideBackgroundImages;

    Swift

    var hideBackgroundImages: Bool { get set }
  • true if images should be hidden under text; false otherwise. Default is false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL hideImagesUnderText;

    Swift

    var hideImagesUnderText: Bool { get set }
  • true if images should be hidden under invisible text; false otherwise. Default is false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL hideImagesUnderInvisibleText;

    Swift

    var hideImagesUnderInvisibleText: Bool { get set }
  • true if text should not reflow over images; false otherwise. Default is false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL doNotReflowTextOverImages;

    Swift

    var doNotReflowTextOverImages: Bool { get set }
  • true if can create annotation; false otherwise. Default is true. This property will be ignored if annotationToolsHidden is true.

    Declaration

    Objective-C

    @property (nonatomic) BOOL annotationModeEnabled;

    Swift

    var annotationModeEnabled: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    - (void)requestReflowForPageNumber:(int)pageNumber;

    Swift

    func requestReflow(forPageNumber pageNumber: Int32)
  • Undocumented

    Declaration

    Objective-C

    - (void)clearCache;

    Swift

    func clearCache()
  • Undocumented

    Declaration

    Objective-C

    - (int)pageNumberForReflowFile:(NSURL *)reflowFile;

    Swift

    func pageNumber(forReflowFile reflowFile: URL) -> Int32
  • Undocumented

    Declaration

    Objective-C

    PT_INIT_UNAVAILABLE
  • Undocumented

    Declaration

    Objective-C

    PT_INIT_UNAVAILABLE