New to Telerik Document ProcessingStart a free 30-day trial

PushButtonField class

Updated on Feb 19, 2026

This article describes the following topics:

Overview

This class corresponds to FormFieldType.PushButton enum value and represents a simple button that may be clicked with the mouse. This is the only field that does not preserve any data. It is usually used to execute some action on mouse click. For the supported by PdfProcessing actions, check the Links help topic.

Properties

PushButtonField provides a single property called Widgets. It represents the collection of Widget annotations, which visualize the field on the PDF pages. The widgets can be added and removed from the collection using the collection's AddWidget() and Remove() methods respectively. As the widget collection implements the IEnumerable interface, the available widget instances can be iterated.

Example 1: Create a PushButtonField and add it to a page

c#
PushButtonField pushButtonField = new PushButtonField("SamplePushButton");

PushButtonWidget widget = pushButtonField.Widgets.AddWidget();
widget.Rect = new Rect(0, 0, 250, 50);
widget.HighlightingMode = HighlightingMode.InvertBorderOfAnnotationRectangle;

widget.AppearanceCharacteristics.Background = new RgbColor(123, 165, 134);
widget.AppearanceCharacteristics.NormalCaption = "Click here";

widget.TextProperties.FontSize = 20;
widget.TextProperties.Font = FontsRepository.Courier;
widget.TextProperties.Fill = new RgbColor(0, 0, 0);
widget.RecalculateContent();

document.AcroForm.FormFields.Add(pushButtonField);
document.Pages[0].Annotations.Add(widget);

In .NET Standard/.NET (Target OS: None) environments, fonts beyond the 14 standard ones require a FontsProvider implementation to be resolved correctly.

See Also

In this article
OverviewPropertiesSee Also
Not finding the help you need?
Contact Support