API Reference
Cmdlet
Add-OfficePdfBackgroundShape
Adds a decorative generated PDF page background shape or band.
Remarks
Background shapes are intended for subtle page structure such as header bands, side bands, highlight panels, or decorative accents. They are rendered behind generated content and should usually use restrained opacity values.
Examples
Add a header band and accent ellipse.
PS>
New-OfficePdf -Path .\Report.pdf {
PdfBackgroundShape -Shape TopBand -Height 86 -FillColor '#DBEAFE' -FillOpacity 0.75
PdfBackgroundShape -Shape Ellipse -X 420 -Y 650 -Width 96 -Height 72 -FillColor '#99F6E4' -FillOpacity 0.35
PdfHeading 'Styled report'
}
Creates a polished generated page background without hand-drawing PDF primitives.
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-OfficePdfBackgroundShape [-CornerRadius <Double>] [-FillColor <String>] [-FillOpacity <Nullable`1>] [-Height <Nullable`1>] [-InsetX <Double>] [-InsetY <Double>] [-OffsetX <Double>] [-OffsetY <Double>] [-PassThru] -Shape <Rectangle> [-StrokeColor <String>] [-StrokeOpacity <Nullable`1>] [-StrokeWidth <Double>] [-Width <Nullable`1>] [-X <Double>] [-Y <Double>] [<CommonParameters>]#Parameter set:
ContextParameters
- CornerRadius Double
- Rounded rectangle or band corner radius in PDF points.
- FillColor String
- Fill color in #RRGGBB format.
- FillOpacity Nullable`1
- Fill opacity from 0 to 1.
- Height Nullable`1
- Shape height in PDF points, or band height for top/bottom bands.
- InsetX Double
- Horizontal inset for top/bottom bands in PDF points.
- InsetY Double
- Vertical inset for left/right bands in PDF points.
- OffsetX Double
- Horizontal offset for left/right bands in PDF points.
- OffsetY Double
- Vertical offset for top/bottom bands in PDF points.
- PassThru SwitchParameter
- Emit the updated document.
- Shape OfficePdfBackgroundShapeType
- Shape type to add.
- Possible values:
Rectangle,RoundedRectangle,Ellipse,TopBand,BottomBand,LeftBand,RightBand - StrokeColor String
- Stroke color in #RRGGBB format.
- StrokeOpacity Nullable`1
- Stroke opacity from 0 to 1.
- StrokeWidth Double
- Stroke width in PDF points.
- Width Nullable`1
- Shape width in PDF points, or band width for left/right bands.
- X Double
- Shape left coordinate in PDF points for explicit shapes.
- Y Double
- Shape bottom coordinate in PDF points for explicit shapes.
Outputs
OfficeIMO.Pdf.PdfDocument
Add-OfficePdfBackgroundShape [-CornerRadius <Double>] -Document <PdfDocument> [-FillColor <String>] [-FillOpacity <Nullable`1>] [-Height <Nullable`1>] [-InsetX <Double>] [-InsetY <Double>] [-OffsetX <Double>] [-OffsetY <Double>] [-PassThru] -Shape <Rectangle> [-StrokeColor <String>] [-StrokeOpacity <Nullable`1>] [-StrokeWidth <Double>] [-Width <Nullable`1>] [-X <Double>] [-Y <Double>] [<CommonParameters>]#Parameter set:
DocumentParameters
- CornerRadius Double
- Rounded rectangle or band corner radius in PDF points.
- Document PdfDocument
- PDF document to update outside the DSL context.
- FillColor String
- Fill color in #RRGGBB format.
- FillOpacity Nullable`1
- Fill opacity from 0 to 1.
- Height Nullable`1
- Shape height in PDF points, or band height for top/bottom bands.
- InsetX Double
- Horizontal inset for top/bottom bands in PDF points.
- InsetY Double
- Vertical inset for left/right bands in PDF points.
- OffsetX Double
- Horizontal offset for left/right bands in PDF points.
- OffsetY Double
- Vertical offset for top/bottom bands in PDF points.
- PassThru SwitchParameter
- Emit the updated document.
- Shape OfficePdfBackgroundShapeType
- Shape type to add.
- Possible values:
Rectangle,RoundedRectangle,Ellipse,TopBand,BottomBand,LeftBand,RightBand - StrokeColor String
- Stroke color in #RRGGBB format.
- StrokeOpacity Nullable`1
- Stroke opacity from 0 to 1.
- StrokeWidth Double
- Stroke width in PDF points.
- Width Nullable`1
- Shape width in PDF points, or band width for left/right bands.
- X Double
- Shape left coordinate in PDF points for explicit shapes.
- Y Double
- Shape bottom coordinate in PDF points for explicit shapes.
Outputs
OfficeIMO.Pdf.PdfDocument