Class

# PDFButton

<div class="rst-class">

forsearch

</div>

PDF

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

A standard button which can submit the values of the controls, reset them all or send the PDF as a file.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                           | Type                                                                            | Read-Only | Shared |
|--------------------------------|---------------------------------------------------------------------------------|-----------|--------|
| `Action<pdfbutton.action>`     | `Actions<pdfbutton.actions>` = `PDFButton.Actions.ResetForm<pdfbutton.actions>` |           |        |
| `Caption<pdfbutton.caption>`   | `String</api/data_types/string>`                                                |           |        |
| `FontSize<pdfbutton.fontsize>` | `Integer</api/data_types/integer>`                                              |           |        |
| `Height<pdfbutton.height>`     | `Integer</api/data_types/integer>`                                              |           |        |
| `Name<pdfbutton.name>`         | `String</api/data_types/string>`                                                |           |        |
| `Page<pdfbutton.page>`         | `Integer</api/data_types/integer>`                                              | ✓         |        |
| `URL<pdfbutton.url>`           | `String</api/data_types/string>`                                                |           |        |
| `Width<pdfbutton.width>`       | `Integer</api/data_types/integer>`                                              |           |        |
| `X<pdfbutton.x>`               | `Integer</api/data_types/integer>`                                              |           |        |
| `Y<pdfbutton.y>`               | `Integer</api/data_types/integer>`                                              |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                  | Parameters                                                                                                                                                                                                                                                                                                           | Returns | Shared |
|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Constructor<pdfbutton.constructor0>` | pageNumber As `Integer</api/data_types/integer>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, name As `String</api/data_types/string>`, caption As `String</api/data_types/string>` |         |        |

## Enumerations

<div id="pdfbutton.actions">

<div class="rst-class">

forsearch

</div>

</div>

PDFButton.Actions

### Actions

> The actions that can be taken when a button is pressed.
>
> | Enum        | Description                                                     |
> |-------------|-----------------------------------------------------------------|
> | ResetForm   | Clears values from all controls.                                |
> | SendPDFFile | Sends the PDFDocument to the `URL<pdfbutton.url>`.              |
> | SendForm    | Sends the values from all controls to the `URL<pdfbutton.url>`. |

## Property descriptions

<div id="pdfbutton.action">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Action

**Action** As `PDFButton.Action<pdfbutton.actions>` = `PDFButton.Actions.Resetform<pdfbutton.actions>`

> The action the button will take when pressed.

<div id="pdfbutton.caption">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Caption

**Caption** As `String</api/data_types/string>`

> The text of the button.

<div id="pdfbutton.fontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.FontSize

**FontSize** As `Integer</api/data_types/integer>`

> The size of the font of the control.

<div id="pdfbutton.height">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Height

**Height** As `Integer</api/data_types/integer>`

> The height of the control.

<div id="pdfbutton.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Name

**Name** As `String</api/data_types/string>`

> The name of the control.

<div id="pdfbutton.page">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Page

**Page** As `Integer</api/data_types/integer>`

> The number of the page upon which the control was created.
>
> This property is read-only.

<div id="pdfbutton.url">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.URL

**URL** As `String</api/data_types/string>`

> The URL to which the values of controls will be submitted.

<div id="pdfbutton.width">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Width

**Width** As `Integer</api/data_types/integer>`

> The width of the control.

<div id="pdfbutton.x">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.X

**X** As `Integer</api/data_types/integer>`

> The location on the X axis of the upper-left corner of the control.

<div id="pdfbutton.y">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Y

**Y** As `Integer</api/data_types/integer>`

> The location on the Y axis of the upper-left corner of the control.

## Method descriptions

<div id="pdfbutton.constructor0">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFButton.Constructor

**Constructor**(pageNumber As `Integer</api/data_types/integer>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, name As `String</api/data_types/string>`, caption As `String</api/data_types/string>`)

> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> `Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.
>
> </div>
>
> Creates an instance of the button with the values passed.

## Notes

Only the button caption is drawn. If you wish there to be a border, you must draw that yourself.

## Compatibility

|                       |                               |
|-----------------------|-------------------------------|
| **Project Types**     | Console, Desktop, Mobile, Web |
| **Operating Systems** | iOS, Linux, macOS, Windows    |

<div class="seealso">

`PDFControl</api/pdf/pdfcontrol>` parent class; `PDFDocument.AddControl<pdfdocument.addcontrol>` method, `PDFControl</api/pdf/pdfcontrol>` class.

</div>
