Disable Rendered Annotation Types


The property renderAnnotationTypes in PSPDFDocument controls what annotations should be visible.

This is a bit-mask of type PSPDFAnnotationType.

To enable all annotations except audio/image/video you can set the following:

Copy
1
2
3
4
5
var annotationTypes = PSPDFAnnotationType.all
annotationTypes.remove(.screen)
annotationTypes.remove(.richMedia)
annotationTypes.remove(.sound)
document.renderAnnotationTypes = annotationTypes
Copy
1
document.renderAnnotationTypes = PSPDFAnnotationTypeAll & ~(PSPDFAnnotationTypeScreen|PSPDFAnnotationTypeRichMedia|PSPDFAnnotationTypeSound|PSPDFAnnotationTypeStamp);

Note: Images are rendered as stamps, but there is no simple way to differentiate between a text stamp (e.g. "Approved") and an image stamp.

Was this page helpful? We're happy to answer any questions.