Some test text!

Edit and create form fields

Contents

Disable form filling
Disable form field creation
This tutorial only applies to Xamarin.Android.

Interactive form filling for form fields such as text fields, checkboxes, radio buttons, dropdowns, signatures, etc. is supported by the PDFTron Android SDK. In addition to form filling, the PDFTron Android SDK also provides API for creating form fields such as text fields, checkboxes, and signatures.

By default, editing and creating 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.

linkDisable form filling

You can disable form field editing altogether by configuring ToolManager using the ToolManagerBuilder and disabling the FORM_FILL:

// Create a custom ToolManager with disabled form field creation
ToolManager.ToolMode[] toolModes = { ToolManager.ToolMode.FormFill };
var tmBuilder = ToolManagerBuilder.From()
    .DisableToolModes(toolModes);

// Add ToolManagerBuilder to your ViewerConfig
var config = new ViewerConfig.Builder()
    .FullscreenModeEnabled(true)
    .MultiTabEnabled(true)
    // ...
    .ToolManagerBuilder(tmBuilder)
    .Build();

linkDisable form field creation

Similarly, 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 = {
    ToolMode.FormCheckboxCreate,
    ToolMode.FormSignatureCreate,
    ToolMode.FormTextFieldCreate
};
var tmBuilder = ToolManagerBuilder.From()
    .DisableToolModes(toolModes);

// Add ToolManagerBuilder to your ViewerConfig
var config = new ViewerConfig.Builder()
    .FullscreenModeEnabled(true)
    .MultiTabEnabled(true)
    // ...
    .ToolManagerBuilder(tmBuilder)
    .Build();

Get the answers you need: Support

Contents

Disable form filling
Disable form field creation