PTTextWidget

@interface PTTextWidget : PTWidget

An object representing a Text Box used in a PDF Form.

  • Creates a Text Widget annotation and initialize it using given Cos/SDF object.

    Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

    Declaration

    Objective-C

    - (instancetype)initWithD:(PTObj *)d;

    Swift

    init!(d: PTObj!)

    Parameters

    d

    The object to use to initialize the Text Widget

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithAnnot: (PTAnnot*)annot;

    Swift

    init!(annot: PTAnnot!)
  • Creates a new Text Widget annotation, in the specified document.

    Declaration

    Objective-C

    + (PTTextWidget *)Create:(PTPDFDoc *)doc
                         pos:(PTPDFRect *)pos
                  field_name:(NSString *)field_name;

    Swift

    class func create(_ doc: PTPDFDoc!, pos: PTPDFRect!, field_name: String!) -> PTTextWidget!

    Parameters

    doc

    The document to which the annotation is added.

    pos

    A rectangle specifying the annotation’s bounds, specified in user space coordinates.

    field_name

    The name of the field for which to create a Text widget.

    Return Value

    A newly created blank Text Widget annotation.

  • Creates a new Text Widget annotation, in the specified document.

    Declaration

    Objective-C

    + (PTTextWidget *)CreateWithField:(PTPDFDoc *)doc
                                  pos:(PTPDFRect *)pos
                                field:(PTField *)field;

    Swift

    class func create(withField doc: PTPDFDoc!, pos: PTPDFRect!, field: PTField!) -> PTTextWidget!

    Parameters

    doc

    The document to which the annotation is added.

    pos

    A rectangle specifying the annotation’s bounds, specified in user space coordinates.

    field

    the field for which to create a Text Widget.

    Return Value

    A newly created blank Widget annotation.

  • Sets the text content of the Text Widget.

    Declaration

    Objective-C

    - (void)SetText:(NSString *)text;

    Swift

    func setText(_ text: String!)

    Parameters

    text

    The text to be displayed in the Text Widget.

  • Retrieves the text content of the Text Widget.

    Declaration

    Objective-C

    - (NSString *)GetText;

    Swift

    func getText() -> String!

    Return Value

    The Text Widget contents.

  • The text field’s default style string.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite, getter=GetDefaultStyle,
              setter=SetDefaultStyle:, nullable) NSString *defaultStyle;

    Swift

    var defaultStyle: String? { get set }
  • The text widget’s rich text value as a string.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite, getter=GetRichText, setter=SetRichText:,
              nullable) NSString *richText;

    Swift

    var richText: String? { get set }