Cmdlet
Set-OfficePdfFormField
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:
DocumentSet-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Value <Hashtable>
[<CommonParameters>]#Parameter set:
PathSet-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Value <Hashtable>
[<CommonParameters>]#Parameter set:
PathDirectorySet-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Value <Hashtable>
[<CommonParameters>]#Parameter set:
LiteralPathSet-OfficePdfFormField
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-Flatten]
[-IgnorePermissionRestrictions]
[-Incremental]
[-KeepNeedAppearances]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Value <Hashtable>
[<CommonParameters>]#Parameter set:
LiteralPathDirectoryDescription
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
- AppearanceFont for this operation.
- -AppearanceFontPath String
- AppearanceFontPath for this operation.
- -Document PdfDocument
- Document for this operation.
- -Flatten SwitchParameter
- Flatten for this operation.
- -Incremental SwitchParameter
- Incremental for this operation.
- -KeepNeedAppearances SwitchParameter
- KeepNeedAppearances for this operation.
- -PassThru SwitchParameter
- PassThru for this operation.
- -Value Hashtable
- Field name -> value; replaces -Field.
- -IgnorePermissionRestrictions SwitchParameter
- After successful authentication only; never bypasses a missing password.
- -LoadOptions PdfLoadOptions
- LoadOptions for this operation.
- -OutputPath String
- OutputPath for this operation.
- -Password SecureString
- Argument transformation also accepts a plain string (with a warning) or a PSCredential (its password).
- -Path String[]
- Path for this operation.
- -OutputDirectory String
- OutputDirectory for this operation.
- -LiteralPath String[]
- 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.