PSPDFAppearanceStreamGenerating
Objective-C
@protocol PSPDFAppearanceStreamGenerating <NSObject>
Swift
protocol AppearanceStreamGenerating : NSObjectProtocol
A instance of this protocol can be set on any PSPDFAnnotation
and instead of using the PSPDFKit provided
appearance stream generation methods, any PDF can be returned.
The annotation will use the first page of the returned PDF as its appearance and this content will be embedded into the PDF.
-
Called when the appearance stream data for the given annotation is needed.
The data represented by the
PSPDFDataProviding
class must be a valid formed PDF. The contents of the first page of that PDF file will be embedded in theannotation
as its appearance stream.Note
This method can be called on any thread at any time and is also time sensitive.Declaration
Objective-C
- (nullable id<PSPDFDataProviding>) dataProviderForAnnotation:(nonnull PSPDFAnnotation *)annotation options:(nullable NSDictionary< PSPDFAppearanceStreamGenerationOption, id> *) options;