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)initWithInputStream:(nonnull NSInputStream *)inputStream
                               documentProvider:(nonnull PSPDFDocumentProvider *)
                                                    documentProvider;

    Swift

    init(inputStream: InputStream, 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 while we’re parsing.

    Declaration

    Objective-C

    @property (readonly, getter=isParsing, atomic) BOOL parsing;

    Swift

    var isParsing: Bool { get }
  • Returns YES if parsing has ended for inputStream.

    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 inputStream. Nilled once we’re done.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSInputStream *inputStream;

    Swift

    var inputStream: InputStream? { get }