Skip to content

zeropdf v1.5.0


zeropdf / ChoiceFieldOptions

Interface: ChoiceFieldOptions

Defined in: src/types.ts:2630

Options for creating a list box or combo box form field.

Properties

PropertyTypeDescriptionDefined in
actions?FieldActionsJavaScript actions attached to this field's /AA dictionary. Each action value is raw PDF JavaScript source code.src/types.ts:2684
appearance?stringCustom appearance stream content for the choice field. Example: "1 0 0 rg 0 0 100 20 re f"src/types.ts:2679
borderWidth?numberAnnotation or field border width in PDF points.src/types.ts:2656
color?ColorInputColor used for drawing, text, or highlighting.src/types.ts:2654
description?stringField description, emitted as /TU (the field's user-facing name). Assistive technology reads it as the field's accessible name, and it satisfies the "form fields have a description" accessibility check.src/types.ts:2636
editable?booleanWhen true, the combo box allows user to type custom values. When false (default), combo box is select-only. Has no effect on list boxes.src/types.ts:2668
encrypt?booleanWhether the field value follows document encryption. When false, the field value is not encrypted (useful for searchable fields). Defaults to true (follow document encryption).src/types.ts:2674
font?FontNameFont used to render text.src/types.ts:2650
fontSize?numberFont size in PDF points.src/types.ts:2652
heightnumberHeight in PDF points.src/types.ts:2644
mode?ChoiceFieldModeChoice field display mode.src/types.ts:2662
optionsstring[]Options that control this item.src/types.ts:2646
readOnly?booleanWhether the form field is read-only.src/types.ts:2658
required?booleanWhether the form field is required.src/types.ts:2660
structure?PdfStructureOptionsAdditional structure metadata for tagged PDF output.src/types.ts:2688
tag?"Annot" | "Artifact"Structure tag used for tagged PDF output.src/types.ts:2686
value?stringCurrent or default value for the option.src/types.ts:2648
widthnumberWidth in PDF points.src/types.ts:2642
xnumberHorizontal position in PDF points.src/types.ts:2638
ynumberVertical position in PDF points.src/types.ts:2640

Released under the ISC license.