Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePdfFormField

Module
PSWriteOffice
Inputs
OfficeIMO.Pdf.PdfDocument System.String[]
Outputs
System.IO.FileInfo OfficeIMO.Pdf.PdfDocument

Fills existing AcroForm fields from a hashtable, optionally flattening the result.

Syntax

Set-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Document <PdfDocument>]
[-Flatten]
[-Incremental]
[-KeepNeedAppearances]
[-PassThru]
-Value <Hashtable>
[<CommonParameters>]
#
Parameter set: Document
Set-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Value <Hashtable>
[<CommonParameters>]
#
Parameter set: Path
Set-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Value <Hashtable>
[<CommonParameters>]
#
Parameter set: PathDirectory
Set-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Value <Hashtable>
[<CommonParameters>]
#
Parameter set: LiteralPath
Set-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Value <Hashtable>
[<CommonParameters>]
#
Parameter set: LiteralPathDirectory

Description

Use Open-OfficePdf editing blocks for existing fields. Set initial field values with Add-OfficePdfFormField when composing a new PDF.

Examples

Use the native OfficePdfFormField command.

Set-OfficePdfFormField -Path .\Forms\Access-Request.pdf -OutputPath .\Forms\Access-Request-Ada.pdf -Value @{ Requester = 'Ada Lovelace'; System = 'ERP' }

Parameters

-AppearanceFont String optional
AppearanceFont for this operation.
-AppearanceFontPath String optional
AppearanceFontPath for this operation.
-Document PdfDocument optionalpipeline: True (ByValue)sets: Document
Document for this operation.
-Flatten SwitchParameter optional
Flatten for this operation.
-Incremental SwitchParameter optional
Incremental for this operation.
-KeepNeedAppearances SwitchParameter optional
KeepNeedAppearances for this operation.
-PassThru SwitchParameter optional
PassThru for this operation.
-Value Hashtable required
Field name -> value; replaces -Field.
-IgnorePermissionRestrictions SwitchParameter optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
After successful authentication only; never bypasses a missing password.
-LoadOptions PdfLoadOptions optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
LoadOptions for this operation.
-OutputPath String requiredsets: Path, LiteralPath
OutputPath for this operation.
-Password SecureString optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
Argument transformation also accepts a plain string (with a warning) or a PSCredential (its password).
-Path String[] requiredposition: 0sets: Path, PathDirectory
Path for this operation.
-OutputDirectory String requiredsets: PathDirectory, LiteralPathDirectory
OutputDirectory for this operation.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath, LiteralPathDirectory
LiteralPath for this operation.

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.