API Reference
Cmdlet
Add-OfficePdfPageOverlay
Overlays or underlays one source PDF page on selected pages of another PDF.
Remarks
Overlays or underlays one source PDF page on selected pages of another PDF.
Examples
Example 1: Place a letterhead page behind every report page.
PS>
Add-OfficePdfPageOverlay -Path .\Report.pdf -SourcePath .\Letterhead.pdf `
-SourcePageNumber 1 -Underlay -Opacity 0.9 -OutputPath .\BrandedReport.pdf
Imports the first source page once and places it behind each target page.
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
Add-OfficePdfPageOverlay [-Fit <Contain|Cover|Stretch>] [-Height <Nullable`1>] [-HorizontalAlign <Left|Center|Right|Justify>] [-IgnorePermissionRestrictions] [-IgnoreSourcePermissionRestrictions] [-Opacity <Double>] -OutputPath <String> [-PageRange <String>] [-Password <String>] -Path <String> [-ReadOptions <PdfReadOptions>] [-SourcePageNumber <Int32>] [-SourcePassword <String>] -SourcePath <String> [-SourceReadOptions <PdfReadOptions>] [-Underlay] [-VerticalAlign <Top|Middle|Bottom>] [-Width <Nullable`1>] [-X <Nullable`1>] [-Y <Nullable`1>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Fit PdfPageOverlayFit
- How the source page fits the target page or explicit rectangle. Possible values: None, Contain, Cover, Stretch
- Possible values:
Contain,Cover,Stretch - Height Nullable`1
- Optional target rectangle height in PDF points.
- HorizontalAlign PdfAlign
- Horizontal placement inside the target page or rectangle. Possible values: Left, Center, Right, Justify
- Possible values:
Left,Center,Right,Justify - IgnorePermissionRestrictions SwitchParameter
- After target authentication, explicitly ignore owner-imposed target restrictions.
- IgnoreSourcePermissionRestrictions SwitchParameter
- After source authentication, explicitly ignore owner-imposed source restrictions.
- Opacity Double
- Opacity of the imported source page.
- OutputPath String
- Output PDF path.
- PageRange String
- Target page selector such as 1-3,odd,last. Omit to apply to every target page.
- Password String
- Password used to authenticate the target PDF.
- Path String
- Target PDF path.
- ReadOptions PdfReadOptions
- Optional bounded read settings for the target PDF.
- SourcePageNumber Int32
- One-based page number imported from the source PDF.
- SourcePassword String
- Password used to authenticate the imported source PDF.
- SourcePath String
- PDF containing the page to import.
- SourceReadOptions PdfReadOptions
- Optional bounded read settings for the imported source PDF.
- Underlay SwitchParameter
- Place the imported page behind existing target-page content.
- VerticalAlign PdfVerticalAlign
- Vertical placement inside the target page or rectangle. Possible values: Top, Middle, Bottom
- Possible values:
Top,Middle,Bottom - Width Nullable`1
- Optional target rectangle width in PDF points.
- X Nullable`1
- Optional target rectangle X coordinate in PDF points.
- Y Nullable`1
- Optional target rectangle Y coordinate in PDF points.
Outputs
System.IO.FileInfo