PTOCRPageOperation


@interface PTOCRPageOperation : NSOperation

An operation that recognizes text (via OCR) on a specified PDF page and applies the result back to the document.

  • Initializes a PTOCRPageOperation instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFDoc:(nonnull PTPDFDoc *)pdfDoc
                                pageNumber:(int)pageNumber;

    Swift

    init(pdfDoc: PTPDFDoc, pageNumber: Int32)

    Parameters

    pdfDoc

    The PDF document.

    pageNumber

    The page number to be processed within the document.

    Return Value

    An initialized PTOCRPageOperation instance.

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    + (instancetype)new NS_UNAVAILABLE;
  • The PDF document in which to recognize text.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) PTPDFDoc *pdfDoc;

    Swift

    var pdfDoc: PTPDFDoc? { get }
  • The page number of pdfDoc on which to recognize and add text.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int pageNumber;

    Swift

    var pageNumber: Int32 { get }
  • In the case that the operation could not complete successfully, the error information can be retrieved via this property.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSError *error;

    Swift

    var error: (any Error)? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL hasText

    Swift

    var hasText: Bool { get }