PSPDFXFDFWriter
Objective-C
@interface PSPDFXFDFWriter : NSObject
Swift
class XFDFWriter : NSObject
Writes data in the XML Forms Data Format (XFDF) standard from PSPDFKit annotations.
-
Whether to ignore page transform matrices (rotation and CropBox offset) when writing XFDF.
Defaults to
false
.Must be set before writing.
Declaration
Objective-C
@property (nonatomic) BOOL ignorePageRotation;
Swift
var ignorePageRotation: Bool { get set }
-
Writes the given annotations to the given
dataSink
and blocks until done.Declaration
Objective-C
- (BOOL)writeAnnotations: (nonnull NSArray<__kindof PSPDFAnnotation *> *)annotations toDataSink:(nonnull id<PSPDFDataSink>)dataSink documentProvider:(nonnull PSPDFDocumentProvider *)documentProvider error:(NSError *_Nullable *_Nullable)error;
Swift
func write(_ annotations: [Annotation], to dataSink: DataSink, documentProvider: PSPDFDocumentProvider) throws
Parameters
annotations
The annotations that should be written.
dataSink
The data sink the XML will be written to. See
-[PSPDFDataProviding createDataSinkWithOptions:]
.documentProvider
The document provider.
error
Pass an error for better error description.
Return Value
YES if the data was written, NO otherwise.