Forms

  • Represents one button form field in a PDF form. They come in three variants:

    • A push button that can have a action attached to it.
    • A check box that can be independently checked or unchecked.
    • A radio button that are mutually exclusive.

    A PSPDFButtonFormField can be the parent of multiple buttons, like a RadioButton group.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFButtonFormField : PSPDFFormField

    Swift

    class PSPDFButtonFormField : PSPDFFormField
  • Represents a choice form field in a PDF form. This allows the user to select one of the given options or, if isEdit is YES, enter their own option value.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFChoiceFormField : PSPDFFormField

    Swift

    class PSPDFChoiceFormField : PSPDFFormField
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFFormOption : NSObject
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    /// Initializes an instance of this class with a label and value.
    - (instancetype)initWithLabel:(NSString *)label value:(NSString *)value NS_DESIGNATED_INITIALIZER;
    
    /// The label of the option which should be presented to the user.
    @property (nonatomic, readonly) NSString *label;
    
    /// The value that gets exported for the given option. Can be the same as `label`
    @property (nonatomic, readonly) NSString *value;
    
    @end

    Swift

    class PSPDFFormOption : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFFormRequest : NSObject
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    - (instancetype)initWithFormat:(PSPDFSubmitFormActionFormat)format values:(NSDictionary<NSString *, id> *)values request:(NSURLRequest *)request NS_DESIGNATED_INITIALIZER;
    
    /// How the form data is to be encoded in the submission.
    @property (nonatomic, readonly) PSPDFSubmitFormActionFormat submissionFormat;
    
    /// Keys and values of the data to be submitted.
    @property (nonatomic, readonly) NSDictionary<NSString *, id> *formValues;
    
    /// The URL request that will be used to fulfill the submission.
    @property (nonatomic, readonly) NSURLRequest *request;
    
    @end

    Swift

    class PSPDFFormRequest : NSObject
  • Delegate for form submission actions. When a form submission action is run, the delegate will be queried in this order:

    1. formSubmissionController:shouldPresentWebViewForResponseData: – should the view controller push a web view with the response data. If yes then the web view takes responsibility for the connection and call 4 is not made.
    2. formSubmissionController:shouldSubmitFormValues: – if no then the operation is cancelled.
    3. formSubmissionController:willSubmitFormValues: – the submission is going ahead. 4.a formSubmissionController:didReceiveResponseData: – the submission has completed successfully OR 4.b formSubmissionController:didFailWithError: – the submission has failed
    See more

    Declaration

    Objective-C

    @protocol PSPDFFormSubmissionDelegate <NSObject>

    Swift

    protocol PSPDFFormSubmissionDelegate : NSObjectProtocol