ComPDF React Native - v3.0.0
    Preparing search index...

    Class CPDFPushbuttonWidget

    A class representing a push button form widget, storing basic information about the button form.

    CPDFPushbuttonWidget

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Update push button widget properties with type safety

      Parameters

      • updates: Partial<
            Pick<
                CPDFPushbuttonWidget,
                | "title"
                | "buttonTitle"
                | "action"
                | "fontColor"
                | "fontSize"
                | "familyName"
                | "styleName"
                | "borderColor"
                | "fillColor"
                | "borderWidth",
            >,
        >

        Partial object containing properties to update

      Returns this

      this instance for chaining

      pushbuttonWidget.update({
      title: 'Updated Title',
      buttonTitle: 'Click Me',
      fontColor: '#FF0000',
      fontSize: 12,
      familyName: 'Helvetica',
      styleName: 'Bold',
      action: CPDFGotoAction.toPage(2)
      });
      await document.updateWidget(pushbuttonWidget);
    • Type Parameters

      Parameters

      • this: new (params: Partial<T>) => T
      • json: any

      Returns T

    • Type Parameters

      Parameters

      • this: new (params: Partial<T>) => T
      • jsonArray: any[]

      Returns T[]

    • Returns Omit<CPDFPushbuttonWidget, "createDate" | "update" | "toJSON"> & {
          createDate?: number;
          borderColor: string;
          fillColor: string;
          borderWidth: number;
      }

    Properties

    buttonTitle: string

    The title of the push button form widget.

    action: CPDFAction | null = null

    The action associated with the push button (default: null).

    fontColor: string

    The font color of the push button (default: '#000000').

    fontSize: number

    The font size of the push button (default: 0).

    familyName: string

    The font family name of the push button.

    styleName: string

    The font style name of the push button.

    The type of the form widget.

    title: string

    The title of the form widget (default: empty string).

    page: number

    The page number where the form widget appears (default: 0).

    uuid: string

    The unique identifier for the form widget (default: empty string).

    createDate: Date | null = null

    The date when the form widget was created (default: null).

    rect: CPDFRectF | null = null

    The rectangular coordinates of the form widget (default: null).

    borderColor: string

    The border color of the form widget (default: '#000000').

    fillColor: string

    The fill color of the form widget (default: '#000000').

    borderWidth: number