Swift API #if !__has_feature(objc_arc) #pragma clang diagnostic pop #endif // :MARK: Instant
The entry point to Instant, representing a client that can connect to PSPDFKit Server.
The Instant client manages the descriptors of the documents that you have access to. It provides the container for your downloaded documents, and controls the communication channel to the server. By providing a delegate, you are informed of relevant events regarding the synced documents and can manage tasks like authentication in a centralized manner.See more
@interface PSPDFInstantClient : NSObject
class InstantClient : NSObject
The root annotation of a freely placed thread of Instant Comments.
In contrast to regular note annotation, comment markers do not have contents of their own. Instead they serve as the anchor for freely placing a comment thread on a page. The actual contents are then represented as an array of comments — objects that have no geometric or appearance-defining properties of their own.
Another difference from regular note annotations is that Instant does not support the author state model defined in the PDF standard. As a result, comment markers will always report an “unspecified” author state and ignore any corresponding updates.See more
A snapshot of the disk cache entry for a certain document identifier.
Keeping these objects around after their creation does not do any harm. As snapshots, however, they do not track changes to the disk cache over time. Because theSee more
overallDiskSpaceis typically dominated by the size of the PDF — not the annotation data stored in any layer — its order of magnitude should be fairly stable, though. Notable exceptions would be scratch-pad style documents that contain mostly empty pages, or documents with many layers containing loads of annotations each.
@protocol PSPDFInstantDocumentCacheEntry <NSObject>
protocol InstantDocumentCacheEntry : NSObjectProtocol
PSPDFInstantDocumentDescriptorrepresents an editing context for annotations on a PDF file managed by Instant.
The document descriptor allows you to download the file and synchronize the annotations in this context, while display and editing of the annotations happens via the specialized
Documentobjects that it provides. You obtain instances that conform to this protocol from a
PSPDFInstantClient, which also keeps the instances it creates alive.
Instant manages the PDF files on disk efficiently, and will reuse the same file for all document descriptors with the same identifier. Therefore, there are some limitations to what you can do with the
Documentinstances you obtain from a document descriptor. For details, see the documentation of
A document descriptor posts the following notifications to inform you of relevant events:
PSPDFInstantDidFailAuthenticationNotificationwhen authenticating the editing context failed
PSPDFInstantDidFinishReauthenticationNotificationwhen the editing context has been reauthenticated
PSPDFInstantDidFailReauthenticationNotificationwhen reauthenticating the editing context failed
PSPDFInstantDidFinishDownloadNotificationwhen the download of the PDF file and associated annotations for a docment descriptor finishes
PSPDFInstantDidFailDownloadNotificationwhen the download of the PDF file or the associated annotations for a document descriptor fails
PSPDFInstantDidBeginSyncingNotificationwhen the document descriptor starts a new sync cycle
PSPDFInstantSyncCycleDidChangeStateNotificationwhen the sync cycle changes its state
PSPDFInstantDidFailSyncingNotificationwhen the sync cycle stops abnormally (reasons include cancellation)
PSPDFInstantDidFinishSyncingNotificationwhen the sync cycle completes successfully
Each of these notifications will typically be posted on a background thread, and have the document descriptor as theirSee more
objectproperty. For a centralized, more type-safe alternative see
PSPDFInstantClientDelegate, and for more details on the sync cycle, refer to the documentation of
@protocol PSPDFInstantDocumentDescriptor <NSObject>
protocol InstantDocumentDescriptor : NSObjectProtocol
A specialized variant of
PDFViewControllerthat supports annotation synchronization.
Showing a document managed by Instant in any other view controller is not supported.
NoteInstant only supports a subset of PSPDFKit’s annotation types. As such, this class sanitizes any
PDFConfigurationpassed to its designated initializer,
If you choose to set the builder’s
nil, all supported annotation types will be editable. If you set
editableAnnotationTypesto an empty set, no annotations will be editable.