Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Copy-OfficePdfPage

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

Copy PDF pages through the native PDF engine.

Syntax

Copy-OfficePdfPage
[-Document <PdfDocument>]
-Page <OfficePageRange>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Document
Copy-OfficePdfPage
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Path
Copy-OfficePdfPage
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: PathDirectory
Copy-OfficePdfPage
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: LiteralPath
Copy-OfficePdfPage
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: LiteralPathDirectory

Examples

Example 1

Copy-OfficePdfPage -Page 'Value'

Example 2

Copy-OfficePdfPage -Page 'Value' -LiteralPath @('C:\Path') -OutputPath 'C:\Path'

Example 3

Copy-OfficePdfPage -Page 'Value' -LiteralPath @('C:\Path') -OutputDirectory 'Value'

Parameters

-Document PdfDocument optionalpipeline: True (ByValue)sets: Document
Explicit native input; omission uses the enclosing New-/Open- content block.
-Page OfficePageRange required
Caller-ordered one-based pages or range expression.
-PassThru SwitchParameter optional
Emit the updated native document or each saved FileInfo.
-WhatIf SwitchParameter optional
Shows what would happen if the command runs.
-Confirm SwitchParameter optional
Prompts for confirmation before running the command.
-IgnorePermissionRestrictions SwitchParameter optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
After authentication, explicitly ignore owner-imposed usage restrictions.
-LoadOptions PdfLoadOptions optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
Native source parsing, authentication and resource settings.
-OutputPath String requiredsets: Path, LiteralPath
Single-file destination.
-Password SecureString optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
Source password.
-Path String[] requiredposition: 0sets: Path, PathDirectory
Input files with FileSystem wildcard expansion.
-OutputDirectory String requiredsets: PathDirectory, LiteralPathDirectory
Destination folder retaining input file names.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath, LiteralPathDirectory
Literal input files, including FileInfo.FullName.

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.