Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Update-OfficePdf

Module
PSWriteOffice
Inputs
System.String[]
Outputs
System.Object

Flattens forms or annotations, or adds a searchable OCR text layer, writing a new PDF.

Syntax

Update-OfficePdf
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-FlattenAnnotation]
[-FlattenForm]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[<CommonParameters>]
#
Parameter set: Flatten
Update-OfficePdf
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-FlattenAnnotation]
[-FlattenForm]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[<CommonParameters>]
#
Parameter set: FlattenDirectory
Update-OfficePdf
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OcrMergeOptions <PdfOcrMergeOptions>]
[-OcrOptions <OfficeOcrOptions>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Searchable
[<CommonParameters>]
#
Parameter set: Searchable
Update-OfficePdf
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OcrMergeOptions <PdfOcrMergeOptions>]
[-OcrOptions <OfficeOcrOptions>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Searchable
[<CommonParameters>]
#
Parameter set: SearchableDirectory
Update-OfficePdf
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-FlattenAnnotation]
[-FlattenForm]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[<CommonParameters>]
#
Parameter set: FlattenLiteralPath
Update-OfficePdf
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OcrMergeOptions <PdfOcrMergeOptions>]
[-OcrOptions <OfficeOcrOptions>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Searchable
[<CommonParameters>]
#
Parameter set: SearchableLiteralPath
Update-OfficePdf
[-AppearanceFont <String>]
[-AppearanceFontPath <String>]
[-FlattenAnnotation]
[-FlattenForm]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[<CommonParameters>]
#
Parameter set: FlattenLiteralPathDirectory
Update-OfficePdf
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OcrMergeOptions <PdfOcrMergeOptions>]
[-OcrOptions <OfficeOcrOptions>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Searchable
[<CommonParameters>]
#
Parameter set: SearchableLiteralPathDirectory

Examples

Use the native OfficePdf command.

Update-OfficePdf -Path .\Forms\Access-Request-Ada.pdf -OutputPath .\Forms\Access-Request-Ada-Final.pdf -FlattenForm

Parameters

-AppearanceFont String optionalsets: Flatten, FlattenDirectory, FlattenLiteralPath, FlattenLiteralPathDirectory
AppearanceFont for this operation.
-AppearanceFontPath String optionalsets: Flatten, FlattenDirectory, FlattenLiteralPath, FlattenLiteralPathDirectory
AppearanceFontPath for this operation.
-FlattenAnnotation SwitchParameter optionalsets: Flatten, FlattenDirectory, FlattenLiteralPath, FlattenLiteralPathDirectory
FlattenAnnotation for this operation.
-FlattenForm SwitchParameter optionalsets: Flatten, FlattenDirectory, FlattenLiteralPath, FlattenLiteralPathDirectory
FlattenForm for this operation.
-IgnorePermissionRestrictions SwitchParameter optional
After successful authentication only; never bypasses a missing password.
-LoadOptions PdfLoadOptions optional
LoadOptions for this operation.
-NoClobber SwitchParameter optional
NoClobber for this operation.
-OutputPath String requiredsets: Flatten, Searchable, FlattenLiteralPath, SearchableLiteralPath
OutputPath for this operation.
-PassThru SwitchParameter optional
PassThru for this operation.
-Password SecureString optional
Argument transformation also accepts a plain string (with a warning) or a PSCredential (its password).
-Path String[] requiredposition: 0sets: Flatten, FlattenDirectory, Searchable, SearchableDirectory
Path for this operation.
-OutputDirectory String requiredsets: FlattenDirectory, SearchableDirectory, FlattenLiteralPathDirectory, SearchableLiteralPathDirectory
OutputDirectory for this operation.
-OcrMergeOptions PdfOcrMergeOptions optionalsets: Searchable, SearchableDirectory, SearchableLiteralPath, SearchableLiteralPathDirectory
Replaces -PdfOptions.
-OcrOptions OfficeOcrOptions optionalsets: Searchable, SearchableDirectory, SearchableLiteralPath, SearchableLiteralPathDirectory
New-OfficeOcrOptions: engine, languages, Tesseract path, data directory, DPI, confidence; same type Read-/Convert-OfficeDocument -Ocr use.
-Searchable SwitchParameter requiredsets: Searchable, SearchableDirectory, SearchableLiteralPath, SearchableLiteralPathDirectory
Searchable for this operation.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: FlattenLiteralPath, SearchableLiteralPath, FlattenLiteralPathDirectory, SearchableLiteralPathDirectory
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.