Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

ConvertTo-OfficePdfFlatForm

Module PSWriteOffice
Inputs
System.String
Outputs
System.IO.FileInfo

Converts a PDF with simple AcroForm fields into a flat PDF.

Syntax

ConvertTo-OfficePdfFlatForm [-AppearanceFontFamilyName <String>] [-AppearanceFontPath <String>] [-IgnorePermissionRestrictions] [-OutputPath] <String> [-Password <String>] [-Path] <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Authored help example

Flatten a filled PDF form.

Set-OfficePdfForm -Path .\Examples\Documents\Request.pdf -OutputPath .\Examples\Documents\Request-Filled.pdf -Field @{
    Requester = 'Ada Lovelace'
    Priority = 'High'
}
ConvertTo-OfficePdfFlatForm -Path .\Examples\Documents\Request-Filled.pdf -OutputPath .\Examples\Documents\Request-Flat.pdf

Turns simple form fields into static page content.

Parameters

-AppearanceFontFamilyName String optional
PDF font family name used for the supplied appearance font.
-AppearanceFontPath String optional
TrueType or OpenType/CFF font file used to synthesize Unicode form field appearances while flattening.
-IgnorePermissionRestrictions SwitchParameter optional
After successful password authentication, explicitly ignore owner-imposed form-modification restrictions.
-OutputPath String requiredposition: 1
Output PDF path.
-Password String optional
Password used to authenticate an encrypted PDF.
-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
Input PDF path.

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.