PSPDFXFDFWriter


@interface PSPDFXFDFWriter : NSObject

Writes an XML in XFDF standard from PSPDFKit annotations. http://partners.adobe.com/public/developer/en/xml/XFDF_Spec_3.0.pdf

  • 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: [PSPDFAnnotation], to dataSink: PSPDFDataSink, 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.