Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Add-OfficePdfPageOverlay

Aliases: PdfPageOverlay
Module
PSWriteOffice
Aliases
PdfPageOverlay
Inputs
None
Outputs
System.IO.FileInfo

Overlays or underlays one source PDF page on selected pages of another PDF.

Syntax

Add-OfficePdfPageOverlay
[-Fit <Contain|Cover|Stretch>]
[-Height <Double>]
[-HorizontalAlign <Left|Center|Right|Justify>]
[-IgnorePermissionRestrictions]
[-IgnoreSourcePermissionRestrictions]
[-Opacity <Double>]
-OutputPath <String>
[-PageRange <String>]
[-PassThru]
[-Password <String>]
-Path <String>
[-ReadOptions <PdfLoadOptions>]
[-SourcePageNumber <Int32>]
[-SourcePassword <String>]
-SourcePath <String>
[-SourceReadOptions <PdfLoadOptions>]
[-Underlay]
[-VerticalAlign <Top|Middle|Bottom>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Place a letterhead page behind every report page.

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.

Parameters

-Fit PdfPageOverlayFit optional
How the source page fits the target page or explicit rectangle.
Possible values: Contain, Cover, Stretch
-Height Double optional
Optional target rectangle height in PDF points.
-HorizontalAlign PdfAlign optional
Horizontal placement inside the target page or rectangle.
Possible values: Left, Center, Right, Justify
-IgnorePermissionRestrictions SwitchParameter optional
After target authentication, explicitly ignore owner-imposed target restrictions.
-IgnoreSourcePermissionRestrictions SwitchParameter optional
After source authentication, explicitly ignore owner-imposed source restrictions.
-Opacity Double optional
Opacity of the imported source page.
-OutputPath String required
Output PDF path.
-PageRange String optional
Target page selector such as 1-3,odd,last. Omit to apply to every target page.
-PassThru SwitchParameter optional
Emit the object created or changed by the command.
-Password String optional
Password used to authenticate the target PDF.
-Path String requiredaliases: FilePath
Target PDF path.
-ReadOptions PdfLoadOptions optional
Optional bounded read settings for the target PDF.
-SourcePageNumber Int32 optional
One-based page number imported from the source PDF.
-SourcePassword String optional
Password used to authenticate the imported source PDF.
-SourcePath String required
PDF containing the page to import.
-SourceReadOptions PdfLoadOptions optional
Optional bounded read settings for the imported source PDF.
-Underlay SwitchParameter optional
Place the imported page behind existing target-page content.
-VerticalAlign PdfVerticalAlign optional
Vertical placement inside the target page or rectangle.
Possible values: Top, Middle, Bottom
-Width Double optional
Optional target rectangle width in PDF points.
-X Double optional
Optional target rectangle X coordinate in PDF points.
-Y Double optional
Optional target rectangle Y coordinate in PDF points.

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.