Some test text!

menu
Create form fieldskeyboard_arrow_down

Create and edit form fields

There are two options to create and edit form fields. First is using a UI component that can create and edit form fields. Second is an API guide to programmatically create form fields.

Create form fields UI

Interactive creation and editing for form fields such as text fields, checkboxes, radio buttons, dropdowns, signatures, etc. is supported by the PDFTron Android SDK.

By default, creating and editing form fields in the drop-in components DocumentActivity and PdfViewCtrlTabHostFragment are automatically enabled unless disabled using ToolManagerBuilder. You can learn more about configuring ToolManager here.

linkSupported widget types

linkText widget

TextFieldCreate tool is responsible for making TextWidget.

text widget

linkCheckbox widget

CheckboxFieldCreate tool is responsible for making CheckBoxWidget.

checkbox widget

linkRadio button widget

RadioGroupFieldCreate tool is responsible for making RadioButtonWidget.

radio button widget

linkList box widget

ListBoxFieldCreate tool is responsible for making ListBoxWidget.

list box widget

linkCombo box widget

ComboBoxFieldCreate tool is responsible for making ComboBoxWidget.

combo box widget

linkSignature widget

SignatureFieldCreate tool is responsible for making SignatureWidget.

signature widget

linkDisable form field creation

You can disable form field creation using the ToolManagerBuilder class and disabling the relevant ToolMode:

// Create a custom ToolManager with disabled form field creation
ToolManager.ToolMode[] toolModes = {
    ToolManager.ToolMode.FORM_CHECKBOX_CREATE,
    ToolManager.ToolMode.FORM_SIGNATURE_CREATE,
    ToolManager.ToolMode.FORM_TEXT_FIELD_CREATE,
    ToolManager.ToolMode.FORM_RADIO_GROUP_CREATE,
    ToolManager.ToolMode.FORM_COMBO_BOX_CREATE,
    ToolManager.ToolMode.FORM_LIST_BOX_CREATE
};
ToolManagerBuilder tmBuilder = ToolManagerBuilder.from()
    .disableToolModes(toolModes);
    
// Add ToolManagerBuilder to your ViewerConfig
ViewerConfig config = new ViewerConfig.Builder()
    .fullscreenModeEnabled(true)
    .multiTabEnabled(true)
    // ...
    .toolManagerBuilder(tmBuilder)
    .build();

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.