API Reference
Cmdlet
Copy-OfficePdfPage
Copies selected PDF pages into a new PDF.
Remarks
Copies selected PDF pages into a new PDF.
Examples
Extract a page range into a new PDF.
PS>
$proof = @(
Copy-OfficePdfPage -Path .\Examples\Documents\Report.pdf -PageRange '1-2,5' -OutputPath .\Examples\Documents\ExecutivePages.pdf
Get-OfficePdfInfo -Path .\Examples\Documents\ExecutivePages.pdf | Select-Object PageCount
)
$proof
Copies selected pages and inspects the resulting PDF.
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.
Syntax
Copy-OfficePdfPage -OutputPath <String> -PageRange <String> -Path <String> [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- OutputPath String
- Output PDF path.
- PageRange String
- Page ranges such as 1-3,5.
- Path String
- Input PDF path.
Outputs
System.IO.FileInfo