FormEditInfo


class FormEditInfo : Parcelable


Record of a form filling operation that has been executed on a single form field in a PDF. Contains the minimum amount of data required to replicate the action on the form.

Summary

Constants

const Int

Indicates a click on a clickable form widget

const Int

Represents setting indices on a combobox or listbox form widget

const Int

Represents setting text on a text field or editable combobox form widget

Public companion functions

FormEditInfo
createClick(widgetIndex: @IntRange(from = 0) Int, clickPoint: PdfPoint)

Create a FormEditInfo object of type EDIT_TYPE_CLICK

FormEditInfo
createSetIndices(
    pageNumber: @IntRange(from = 0) Int,
    widgetIndex: @IntRange(from = 0) Int,
    selectedIndices: IntArray
)

Create a FormEditInfo object of type EDIT_TYPE_SET_INDICES

FormEditInfo
createSetText(
    pageNumber: @IntRange(from = 0) Int,
    widgetIndex: @IntRange(from = 0) Int,
    text: String
)

Create a FormEditInfo object of type EDIT_TYPE_SET_TEXT

Public companion properties

Parcelable.Creator<FormEditInfo>

Public functions

open Int
open operator Boolean
equals(other: Any?)
Int

Returns the index of the selected item in the list FormWidgetInfo.listItems at the given index in the list of selected indices.

open Int
open Unit
writeToParcel(dest: Parcel, flags: Int)

Public properties

PdfPoint?
Int

Represents the page number on which the edit occurred

Int

Returns the count of the selected items.

String?
Int
Int

Represents the index of the widget that was edited.

Constants

EDIT_TYPE_CLICK

const val EDIT_TYPE_CLICK = 0: Int

Indicates a click on a clickable form widget

EDIT_TYPE_SET_INDICES

const val EDIT_TYPE_SET_INDICES = 1: Int

Represents setting indices on a combobox or listbox form widget

EDIT_TYPE_SET_TEXT

const val EDIT_TYPE_SET_TEXT = 2: Int

Represents setting text on a text field or editable combobox form widget

Public companion functions

createClick

Added in 1.0.0-alpha13
fun createClick(widgetIndex: @IntRange(from = 0) Int, clickPoint: PdfPoint): FormEditInfo

Create a FormEditInfo object of type EDIT_TYPE_CLICK

Parameters
widgetIndex: @IntRange(from = 0) Int

The index of the widget that was edited.

clickPoint: PdfPoint

The point on the pageNumber in PDF coordinates where the click occurred. Note: The origin exists at the top left corner of the page.

See also
viewToPdfPoint

createSetIndices

Added in 1.0.0-alpha13
fun createSetIndices(
    pageNumber: @IntRange(from = 0) Int,
    widgetIndex: @IntRange(from = 0) Int,
    selectedIndices: IntArray
): FormEditInfo

Create a FormEditInfo object of type EDIT_TYPE_SET_INDICES

Parameters
pageNumber: @IntRange(from = 0) Int

The page number on which the edit occurred.

widgetIndex: @IntRange(from = 0) Int

The index of the widget that was edited.

selectedIndices: IntArray

The indices of the selected items from FormWidgetInfo.listItems

createSetText

Added in 1.0.0-alpha13
fun createSetText(
    pageNumber: @IntRange(from = 0) Int,
    widgetIndex: @IntRange(from = 0) Int,
    text: String
): FormEditInfo

Create a FormEditInfo object of type EDIT_TYPE_SET_TEXT

Parameters
pageNumber: @IntRange(from = 0) Int

The page number on which the edit occurred.

widgetIndex: @IntRange(from = 0) Int

The index of the widget that was edited.

text: String

The text to set on the widget.

Public companion properties

Public functions

describeContents

Added in 1.0.0-alpha13
open fun describeContents(): Int

equals

open operator fun equals(other: Any?): Boolean

getSelectedIndexAt

Added in 1.0.0-alpha13
fun getSelectedIndexAt(index: Int): Int

Returns the index of the selected item in the list FormWidgetInfo.listItems at the given index in the list of selected indices.

Parameters
index: Int

The position of the selected index to retrieve, from 0 to selectedIndexCount - 1.

Returns
Int

The index of the selected item from the list FormWidgetInfo.listItems, returns -1 in case there is no selection or the index is invalid.

hashCode

open fun hashCode(): Int

writeToParcel

Added in 1.0.0-alpha13
open fun writeToParcel(dest: Parcel, flags: Int): Unit

Public properties

clickPoint

Added in 1.0.0-alpha13
val clickPointPdfPoint?

pageNumber

Added in 1.0.0-alpha13
val pageNumberInt

Represents the page number on which the edit occurred

selectedIndexCount

Added in 1.0.0-alpha13
val selectedIndexCountInt

Returns the count of the selected items.

See also
createSetIndices

'selectedIndices' in FormEditInfo.createSetIndices.

text

Added in 1.0.0-alpha13
val textString?

type

Added in 1.0.0-alpha13
val typeInt

widgetIndex

Added in 1.0.0-alpha13
val widgetIndexInt

Represents the index of the widget that was edited.