Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.65 KB

checkbox.md

File metadata and controls

46 lines (34 loc) · 1.65 KB

API Documentation for CheckBox

NoPoDoFo CheckBox

A Checkbox is a field that toggles between two states, open and closed. The oopen(on) and closed(off) state of the field has a direct correlation to the on and off states of the AP (appearance stream) of the Annotation.

class CheckBox extends Field {
  new(page: Page, fieldIndex: number): CheckBox
  new(form: Form, annotation: Annotation): CheckBox

  checked: boolean
}

Constructors


Construct a CheckBox from an existing object. The CheckBox Annotation must already exist in the Page's Annotations Dictionary. This constructor will create the instance given the index of the Annotation in the Page's Annotations Dictionary. If the index value is less than zero or greater than the length of the Page's Annotations Dictionary (see annotationsCount) a Range Error will be thrown.

new(page: Page, fieldIndex: number): CheckBox

Create a new CheckBox from an Annotation and owned by the Form. The Annotation must be a Widget type annotation.

new(form: Form, annotation: Annotation): CheckBox

Properties


checked

Toggle the AS property of the checkbox annotations dictionary; AS values maybe one of ON or OFF.