API Reference
Cmdlet
Set-OfficePdfPage
Sets page-level PDF properties and writes a new PDF.
Remarks
Sets page-level PDF properties and writes a new PDF.
Examples
Rotate selected PDF pages.
PS>
$proof = @(
Set-OfficePdfPage -Path .\Examples\Documents\Scanned.pdf -PageRange '2,4' -Rotation 90 -OutputPath .\Examples\Documents\Scanned-Rotated.pdf
Get-OfficePdfInfo -Path .\Examples\Documents\Scanned-Rotated.pdf | Select-Object PageCount
)
$proof
Rotates selected pages and writes a new 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
Set-OfficePdfPage [-Bottom <Nullable`1>] [-BoxName <MediaBox|CropBox|BleedBox|TrimBox|ArtBox>] [-Height <Nullable`1>] [-Landscape] [-Left <Nullable`1>] -OutputPath <String> [-PageRange <String>] [-PageSize <String>] -Path <String> [-ResizeMargin <Nullable`1>] [-ResizeMode <Fit|Fill|Stretch>] [-Right <Nullable`1>] [-Rotation <0|90|180|270>] [-Top <Nullable`1>] [-Width <Nullable`1>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Bottom Nullable`1
- Bottom coordinate for the page boundary box.
- BoxName String
- Page boundary box to set. Supported values are MediaBox, CropBox, BleedBox, TrimBox, and ArtBox.
- Possible values:
MediaBox,CropBox,BleedBox,TrimBox,ArtBox - Height Nullable`1
- Custom page height in points when -PageSize Custom is used.
- Landscape SwitchParameter
- Use the landscape orientation of the selected page size.
- Left Nullable`1
- Left coordinate for the page boundary box.
- OutputPath String
- Output PDF path.
- PageRange String
- Page ranges such as 1-3,5. Omit to affect all pages.
- PageSize String
- Resize selected pages to a known OfficeIMO page size such as A4, Letter, or Custom.
- Path String
- Input PDF path.
- ResizeMargin Nullable`1
- Margin, in points, reserved around resized page content.
- ResizeMode PdfPageResizeMode
- How source page content is fitted into the resized output page.
- Possible values:
Fit,Fill,Stretch - Right Nullable`1
- Right coordinate for the page boundary box.
- Rotation Int32
- Rotation in degrees. Supported values are 0, 90, 180, and 270.
- Possible values:
0,90,180,270 - Top Nullable`1
- Top coordinate for the page boundary box.
- Width Nullable`1
- Custom page width in points when -PageSize Custom is used.
Outputs
System.IO.FileInfo