API Reference

Cmdlet

Add-OfficePdfPageOverlay

Aliases: PdfPageOverlay
Namespace PSWriteOffice
Aliases
PdfPageOverlay
Outputs
System.IO.FileInfo

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

Authored help example

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 Sets

Parameters

Fit PdfPageOverlayFit optionalposition: namedpipeline: Falsevalues: 3
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 optionalposition: namedpipeline: False
Optional target rectangle height in PDF points.
HorizontalAlign PdfAlign optionalposition: namedpipeline: Falsevalues: 4
Horizontal placement inside the target page or rectangle. Possible values: Left, Center, Right, Justify
Possible values: Left, Center, Right, Justify
IgnorePermissionRestrictions SwitchParameter optionalposition: namedpipeline: False
After target authentication, explicitly ignore owner-imposed target restrictions.
IgnoreSourcePermissionRestrictions SwitchParameter optionalposition: namedpipeline: False
After source authentication, explicitly ignore owner-imposed source restrictions.
Opacity Double optionalposition: namedpipeline: False
Opacity of the imported source page.
OutputPath String requiredposition: namedpipeline: False
Output PDF path.
PageRange String optionalposition: namedpipeline: False
Target page selector such as 1-3,odd,last. Omit to apply to every target page.
Password String optionalposition: namedpipeline: False
Password used to authenticate the target PDF.
Path String requiredposition: namedpipeline: Falsealiases: FilePath
Target PDF path.
ReadOptions PdfReadOptions optionalposition: namedpipeline: False
Optional bounded read settings for the target PDF.
SourcePageNumber Int32 optionalposition: namedpipeline: False
One-based page number imported from the source PDF.
SourcePassword String optionalposition: namedpipeline: False
Password used to authenticate the imported source PDF.
SourcePath String requiredposition: namedpipeline: False
PDF containing the page to import.
SourceReadOptions PdfReadOptions optionalposition: namedpipeline: False
Optional bounded read settings for the imported source PDF.
Underlay SwitchParameter optionalposition: namedpipeline: False
Place the imported page behind existing target-page content.
VerticalAlign PdfVerticalAlign optionalposition: namedpipeline: Falsevalues: 3
Vertical placement inside the target page or rectangle. Possible values: Top, Middle, Bottom
Possible values: Top, Middle, Bottom
Width Nullable`1 optionalposition: namedpipeline: False
Optional target rectangle width in PDF points.
X Nullable`1 optionalposition: namedpipeline: False
Optional target rectangle X coordinate in PDF points.
Y Nullable`1 optionalposition: namedpipeline: False
Optional target rectangle Y coordinate in PDF points.

Outputs

System.IO.FileInfo