# Add-OfficePdfFormField

Adds a simple AcroForm field to a generated PDF document.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: PdfFormField

**Module**

`PSWriteOffice`

**Aliases**

`PdfFormField`

**Inputs**

`OfficeIMO.Pdf.PdfDocument`

**Outputs**

`OfficeIMO.Pdf.PdfDocument`

**Source**

[AddOfficePdfFormFieldCommand.cs:24](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/AddOfficePdfFormFieldCommand.cs#L24) 

Adds a simple AcroForm field to a generated PDF document.

## Syntax

```
Add-OfficePdfFormField
[-Align <Left|Center|Right|Justify>]
[-Checked]
[-Height <Double>]
[-Name] <String>
[-Options <String[]>]
[-PassThru]
[-Type <Text|CheckBox|Choice|MultiSelectChoice|RadioButton>]
[-Value <String>]
[-Values <String[]>]
[-Width <Double>]
[<CommonParameters>]
```

[#](#method-add-officepdfformfield-pdfalign-switchparameter-double-string-string-switchparameter-officepdfformfieldtype-string-string-double)

Parameter set: `Context`

```
Add-OfficePdfFormField
[-Align <Left|Center|Right|Justify>]
[-Checked]
-Document <PdfDocument>
[-Height <Double>]
[-Name] <String>
[-Options <String[]>]
[-PassThru]
[-Type <Text|CheckBox|Choice|MultiSelectChoice|RadioButton>]
[-Value <String>]
[-Values <String[]>]
[-Width <Double>]
[<CommonParameters>]
```

[#](#method-add-officepdfformfield-pdfalign-switchparameter-pdfdocument-double-string-string-switchparameter-officepdfformfieldtype-string-string-double)

Parameter set: `Document`

## Examples

### Create a simple PDF form.

```powershell
New-OfficePdf -Path .\Examples\Documents\PdfForm.pdf {
  Add-OfficePdfHeading -Text 'Access request'
  Add-OfficePdfParagraph -Text 'Requester'
  Add-OfficePdfFormField -Name 'Requester' -Type Text -Width 240
  Add-OfficePdfParagraph -Text 'Priority'
  Add-OfficePdfFormField -Name 'Priority' -Type Choice -Options 'Low','Normal','High' -Value 'Normal'
  Add-OfficePdfFormField -Name 'Approved' -Type CheckBox
}
```

Adds text, choice, and checkbox form fields to a generated PDF.

## Parameters

**-Align PdfAlign optional**

Field alignment.

Possible values: `Left`, `Center`, `Right`, `Justify`

**-Checked SwitchParameter optional**

Initial check-box state.

**-Height Double optional**

Rendered field height in PDF points.

**-Name String requiredposition: 0**

Form field name.

**-Options String[] optional**

Choice or radio options.

**-PassThru SwitchParameter optional**

Emit the updated document.

**-Type OfficePdfFormFieldType optional**

Field type to add.

Possible values: `Text`, `CheckBox`, `Choice`, `MultiSelectChoice`, `RadioButton`

**-Value String optional**

Initial text, selected choice, or selected radio value.

**-Values String[] optional**

Initial selected values for multi-select choice fields.

**-Width Double optional**

Rendered field width in PDF points.

**-Document PdfDocument requiredpipeline: True (ByValue)sets: Document**

PDF document to update outside the DSL context.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:DBFBB1948240A62790C69E3B3B1D2016DE15B2CD2C6526CA865EAFE4EA2EEADB -->
