PSPDFXFDFParser


@interface PSPDFXFDFParser : NSObject

Parses an XML in the XFDF standard. http://partners.adobe.com/public/developer/en/xml/XFDF_Spec_3.0.pdf

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFXFDFParser : NSObject
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFXFDFParser : NSObject
  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
    initWithDataProvider:(nonnull id<PSPDFDataProviding>)dataProvider
        documentProvider:(nonnull PSPDFDocumentProvider *)documentProvider;

    Swift

    init(dataProvider: PSPDFDataProviding, documentProvider: PSPDFDocumentProvider)
  • Parse XML and block until it’s done. Returns the resulting annotations after parsing is finished (which can also be accessed later on). PSPDFFormField will not be returned by this method, but if values were imported they are now set in the appropriate fields on documentProvider.formParser.formFields.

    Declaration

    Objective-C

    - (nullable NSArray<PSPDFAnnotation *> *)parseWithError:
        (NSError *_Nullable *_Nullable)error;

    Swift

    func parse() throws -> [PSPDFAnnotation]
  • Return all annotations as array. Annotations are sorted by page.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<PSPDFAnnotation *> *_Nonnull annotations;

    Swift

    var annotations: [PSPDFAnnotation] { get }
  • Returns YES if parsing has ended for dataProvider.

    Declaration

    Objective-C

    @property (readonly, atomic) BOOL parsingEnded;

    Swift

    var parsingEnded: Bool { get }
  • The attached document provider.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFDocumentProvider *_Nullable documentProvider;

    Swift

    weak var documentProvider: PSPDFDocumentProvider? { get }
  • The used data provider.

    Declaration

    Objective-C

    @property (readonly, nonatomic) id<PSPDFDataProviding> _Nonnull dataProvider;

    Swift

    var dataProvider: PSPDFDataProviding { get }