PSPDFFormParser


@interface PSPDFFormParser : NSObject

Parses PDF Forms (AcroForms). This will not create objects based on the (soon deprecated) XFA standard. - see: https://pspdfkit.com/guides/ios/current/rendering-issues/pspdfkit-doesnt-show-the-pdf-form/

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFFormParser : NSObject
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFFormParser : NSObject
  • Attached document provider.

    Declaration

    Objective-C

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

    Swift

    weak var documentProvider: PSPDFDocumentProvider? { get }
  • A collection of all forms in AcroForm. Lazily evaluated.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<__kindof PSPDFFormElement *> *_Nonnull forms;

    Swift

    var forms: [PSPDFFormElement] { get }
  • A collection of all form fields in the AcroForm. Lazily evaluated.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable)
        NSArray<__kindof PSPDFFormField *> *formFields;

    Swift

    var formFields: [PSPDFFormField]? { get }
  • Return all dirty = unsaved form elements

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable)
        NSArray<__kindof PSPDFFormElement *> *dirtyForms;

    Swift

    var dirtyForms: [PSPDFFormElement]? { get }
  • Finds a form element with its field name. Returns nil if not found.

    Declaration

    Objective-C

    - (nullable __kindof PSPDFFormElement *)findAnnotationWithFieldName:
        (nonnull NSString *)fieldName;

    Swift

    func findAnnotation(withFieldName fieldName: String) -> PSPDFFormElement?
  • Finds a form field with the given fully qualified field name.

    Declaration

    Objective-C

    - (nullable __kindof PSPDFFormField *)findFieldWithFullFieldName:
        (nonnull NSString *)fullFieldName;

    Swift

    func findField(withFullFieldName fullFieldName: String) -> PSPDFFormField?

    Parameters

    fullFieldName

    The fully qualified field name.

    Return Value

    The form field, if found. nil otherwise.