Cmdlet
Copy-OfficePdfPage
Copy PDF pages through the native PDF engine.
Syntax
Copy-OfficePdfPage
[-Document <PdfDocument>]
-Page <OfficePageRange>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]#Parameter set:
DocumentCopy-OfficePdfPage
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]#Parameter set:
PathCopy-OfficePdfPage
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]#Parameter set:
PathDirectoryCopy-OfficePdfPage
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]#Parameter set:
LiteralPathCopy-OfficePdfPage
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]#Parameter set:
LiteralPathDirectoryExamples
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
- Explicit native input; omission uses the enclosing New-/Open- content block.
- -Page OfficePageRange
- Caller-ordered one-based pages or range expression.
- -PassThru SwitchParameter
- Emit the updated native document or each saved FileInfo.
- -WhatIf SwitchParameter
- Shows what would happen if the command runs.
- -Confirm SwitchParameter
- Prompts for confirmation before running the command.
- -IgnorePermissionRestrictions SwitchParameter
- After authentication, explicitly ignore owner-imposed usage restrictions.
- -LoadOptions PdfLoadOptions
- Native source parsing, authentication and resource settings.
- -OutputPath String
- Single-file destination.
- -Password SecureString
- Source password.
- -Path String[]
- Input files with FileSystem wildcard expansion.
- -OutputDirectory String
- Destination folder retaining input file names.
- -LiteralPath String[]
- 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.