PTCoordinatedDocument


@interface PTCoordinatedDocument : UIDocument

A UIDocument subclass backed by a PTPDFDoc object.

To instantiate a new PTCoordinatedDocument, use initWithFileURL:.

  • The PDF document model used to access the underlying PDFDoc.

    The value of this property is nil if the model is not loaded.

    Note

    The default value of this property is nil.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) PTPDFDocumentModel *documentModel;

    Swift

    var documentModel: PTPDFDocumentModel? { get }
  • The underlying PDF document. This property will be nil until the UIDocument is loaded.

    This property should not generally be set, except when the document may have been modified by out outside process, and needs to be reloaded.

    To instantiate a new PTCoordinatedDocument, use initWithFileURL:.

    Declaration

    Objective-C

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

    Swift

    var pdfDoc: PTPDFDoc? { get }
  • The last error that this document experienced.

    Declaration

    Objective-C

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

    Swift

    var error: (any Error)? { get set }
  • The delegate of the PTCoordinatedDocument object.

    Declaration

    Objective-C

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

    Swift

    weak var delegate: (any PTCoordinatedDocumentDelegate)? { get set }
  • The save flag(s) that will be used if the system triggers a save. Default is e_ptincremental.

    Declaration

    Objective-C

    @property (nonatomic) PTSaveOptions defaultSaveFlags;

    Swift

    var defaultSaveFlags: PTSaveOptions { get set }
  • Undocumented

    Declaration

    Objective-C

    - (void)saveToURL:(NSURL *)url withSaveOptions:(PTSaveOptions)saveOptions forSaveOperation:(UIDocumentSaveOperation)saveOperation completionHandler:(void (^ __nullable)(BOOL success))completionHandler;

    Swift

    func save(to url: URL, with saveOptions: PTSaveOptions, for saveOperation: UIDocument.SaveOperation) async -> Bool