PSPDFTextFormField


@interface PSPDFTextFormField : PSPDFFormField

Represents a text form field in a PDF form. Allows the user to enter custom text.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFTextFormField : PSPDFFormField
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFTextFormField : PSPDFFormField
  • Inserts a new PSPDFTextFormField into the document.

    Note

    This new form field will automatically be added to the document.

    Declaration

    Objective-C

    + (nullable instancetype)
    insertedTextFieldWithFullyQualifiedName:(nonnull NSString *)fullyQualifiedName
                           documentProvider:
                               (nonnull PSPDFDocumentProvider *)documentProvider
                                formElement:(nonnull PSPDFFormElement *)formElement
                                      error:(NSError *_Nullable *_Nullable)error;

    Swift

    class func insertedTextField(withFullyQualifiedName fullyQualifiedName: String, documentProvider: PSPDFDocumentProvider, formElement: PSPDFFormElement) throws -> Self

    Parameters

    fullyQualifiedName

    Each form field is identifiable using its fully qualified name. You can specify any dot separated name.

    documentProvider

    The document the form field gets inserted in.

    formElement

    One PSPDFChoiceFormElement that will be linked to this form field. The form elements are the visual representation of the form on the page. If the form elements aren’t yet added to the document provider, they will be added.

    error

    The error, if any happens.

    Return Value

    Either an instance of PSPDFTextFormField or nil if an error occurs.

  • If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isMultiLine;

    Swift

    var isMultiLine: Bool { get set }
  • If set, the field is intended for entering a secure password that should not be echoed visibly to the screen.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isPassword;

    Swift

    var isPassword: Bool { get set }
  • (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isComb;

    Swift

    var isComb: Bool { get set }
  • (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL doNotScroll;

    Swift

    var doNotScroll: Bool { get set }
  • (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isRichText;

    Swift

    var isRichText: Bool { get set }
  • (PDF 1.4) If set, text entered in the field shall not be spell-checked.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL doNotSpellCheck;

    Swift

    var doNotSpellCheck: Bool { get set }
  • (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL fileSelect;

    Swift

    var fileSelect: Bool { get set }
  • The text value of the text form field.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *text;

    Swift

    var text: String? { get set }
  • The rich text value of the text form field.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *richText;

    Swift

    var richText: String? { get set }
  • The maximum length of the field’s text, in characters. Returns 0 if length is unlimited.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSUInteger maxLength;

    Swift

    var maxLength: UInt { get set }