By default, PSPDFKit will render all known annotation types. See
PSPDFAnnotation.h for a full list of the available types.
There are two main definition types used in PSPDFKit.
PSPDFAnnotationType as an integer bit-field with all PDF types as defined in the PDF spec (e.g.
PSPDFAnnotationTypeInk); and a string variant that is better suited for arrays (
There are also some special annotation types that correspond to subtypes (e.g.
PSPDFAnnotationStringSignature is actually of type
PSPDFAnnotationTypeInk but is handled differently in the framework). There are also some features masked as annotation types, such as
PSPDFAnnotationStateManager.h for all definitions).
renderAnnotationTypes property controls what annotations are rendered. It's a bit-mask and defaults to
To just allow highlights and drawings to be rendered, configure the document like this:
You should configure this property before the document is presented in a
PSPDFViewController. If you change it afterwards, either call
reloadData or, as a more fine-grained and faster approach, call
updateView on all visible page views:
When changing the visible annotations after a document has already been rendered, either in a previous session or when the document is presented right now, you need to clear the cache for this document by calling
annotationsEnabled property on
PSPDFDocument, annotations can be completely disabled. Note that links are also annotations, and you almost never want to disable links. There are valid use cases however, so this is an option. Changing this also requires a call to
reloadData if the document is already displayed. When enabling or disabling annotations after the document has already been rendered, either in a previous session or when the document is presented right now, you need to clear the cache for this document by calling
The annotation creation menu that appears on a long tap has a different configuration as well.