# PdfPageBackgroundShape

Reusable page background shape rendered behind page content.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfPageBackgroundShape.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L14)

**Modifiers**

sealed

Reusable page background shape rendered behind page content.

## Inheritance

- object
- PdfPageBackgroundShape

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Small-format workshop badges](/showcase/pdf-event-badges/) Sample
  
  Generate two individual 340-by-255-point PDF workshop badges with participant names, roles and event details. Preview both pages and adapt the C# source.

## Usage

Explore 11 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 9

- Property [PdfCreateOptions.PageBackgroundShapes](/api/pdf/officeimo-pdf-pdfcreateoptions/#property-pagebackgroundshapes)
- Method [PdfPageBackgroundShape.BottomBand](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-bottomband-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-nullable-system-double-nullable-system-double-officeimo-drawing-officelineargradient)
- Method [PdfPageBackgroundShape.Clone](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-clone)
- Method [PdfPageBackgroundShape.Ellipse](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-ellipse-officeimo-officelength-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-nullable-officeimo-officecolor-officeimo-officelength-nullable-system-double-nullable-system-double-officeimo-drawing-officelineargradient)
- Method [PdfPageBackgroundShape.LeftBand](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-leftband-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-nullable-system-double-nullable-system-double-officeimo-drawing-officelineargradient)
- Method [PdfPageBackgroundShape.Rectangle](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-rectangle-officeimo-officelength-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-nullable-officeimo-officecolor-officeimo-officelength-nullable-system-double-nullable-system-double-officeimo-drawing-officelineargradient)
- Method [PdfPageBackgroundShape.RightBand](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-rightband-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-nullable-system-double-nullable-system-double-officeimo-drawing-officelineargradient)
- Method [PdfPageBackgroundShape.RoundedRectangle](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-roundedrectangle-officeimo-officelength-officeimo-officelength-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-nullable-officeimo-officecolor-officeimo-officelength-nullable-system-double-nullable-system-double-officeimo-drawing-officelineargradient)
- Method [PdfPageBackgroundShape.TopBand](/api/pdf/officeimo-pdf-pdfpagebackgroundshape/#method-topband-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-officeimo-officelength-officeimo-officelength-nullable-officeimo-officecolor-officeimo-officelength-nullable-system-double-nullable-system-double-officeimo-drawing-officelineargradient)

### Accepted by parameters 2

- Method [PdfPageBuilder.BackgroundShape](/api/pdf/officeimo-pdf-pdfpagebuilder/#method-backgroundshape-officeimo-pdf-pdfpagebackgroundshape) parameter `shape`
- Method [PdfPageBuilder.BackgroundShapes](/api/pdf/officeimo-pdf-pdfpagebuilder/#method-backgroundshapes-collections-generic-ienumerable-officeimo-pdf-pdfpagebackgroundshape) parameter `shapes`

Filter members 

Show inherited

## Constructors

`public PdfPageBackgroundShape(OfficeShape shape, OfficeLength x, OfficeLength y)` [#](#constructor-ctor-officeimo-drawing-officeshape-officeimo-officelength-officeimo-officelength)

[PdfPageBackgroundShape.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L14)

Creates a page background shape at an absolute page position in points.

Parameters

**shape OfficeIMO.Drawing.OfficeShape required**

**x OfficeIMO.OfficeLength required**

**y OfficeIMO.OfficeLength required**

## Methods

`public static PdfPageBackgroundShape BottomBand(OfficeLength pageWidth, OfficeLength pageHeight, OfficeLength height, OfficeColor? fill = null, OfficeLength insetX = default, OfficeLength offsetY = default, OfficeLength cornerRadius = default, OfficeColor? stroke = null, OfficeLength strokeWidth = default, double? fillOpacity = null, double? strokeOpacity = null, OfficeLinearGradient? fillGradient = null)` [#](#member-021474b8a657c0b2a729847a)

[PdfPageBackgroundShape.cs:94](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L94)

Creates a full-width band anchored to the bottom of a page.

Parameters

**pageWidth OfficeIMO.OfficeLength required**

**pageHeight OfficeIMO.OfficeLength required**

**height OfficeIMO.OfficeLength required**

**fill OfficeIMO.OfficeColor? = null optional**

**insetX OfficeIMO.OfficeLength = default optional**

**offsetY OfficeIMO.OfficeLength = default optional**

**cornerRadius OfficeIMO.OfficeLength = default optional**

**stroke OfficeIMO.OfficeColor? = null optional**

**strokeWidth OfficeIMO.OfficeLength = default optional**

**fillOpacity double? = null optional**

**strokeOpacity double? = null optional**

**fillGradient OfficeIMO.Drawing.OfficeLinearGradient? = null optional**

Returns

`PdfPageBackgroundShape`

`public PdfPageBackgroundShape Clone()` [#](#method-clone)

[PdfPageBackgroundShape.cs:136](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L136)

Creates a deep copy of this page background shape.

Returns

`PdfPageBackgroundShape`

`public static PdfPageBackgroundShape Ellipse(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, OfficeColor? fill = null, OfficeColor? stroke = null, OfficeLength strokeWidth = default, double? fillOpacity = null, double? strokeOpacity = null, OfficeLinearGradient? fillGradient = null)` [#](#member-c0bd45b39616608917501e2d)

[PdfPageBackgroundShape.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L72)

Creates an ellipse background shape.

Parameters

**x OfficeIMO.OfficeLength required**

**y OfficeIMO.OfficeLength required**

**width OfficeIMO.OfficeLength required**

**height OfficeIMO.OfficeLength required**

**fill OfficeIMO.OfficeColor? = null optional**

**stroke OfficeIMO.OfficeColor? = null optional**

**strokeWidth OfficeIMO.OfficeLength = default optional**

**fillOpacity double? = null optional**

**strokeOpacity double? = null optional**

**fillGradient OfficeIMO.Drawing.OfficeLinearGradient? = null optional**

Returns

`PdfPageBackgroundShape`

`public static PdfPageBackgroundShape LeftBand(OfficeLength pageWidth, OfficeLength pageHeight, OfficeLength width, OfficeColor? fill = null, OfficeLength insetY = default, OfficeLength offsetX = default, OfficeLength cornerRadius = default, OfficeColor? stroke = null, OfficeLength strokeWidth = default, double? fillOpacity = null, double? strokeOpacity = null, OfficeLinearGradient? fillGradient = null)` [#](#member-1fc5101f06a812d28328ed56)

[PdfPageBackgroundShape.cs:108](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L108)

Creates a full-height band anchored to the left side of a page.

Parameters

**pageWidth OfficeIMO.OfficeLength required**

**pageHeight OfficeIMO.OfficeLength required**

**width OfficeIMO.OfficeLength required**

**fill OfficeIMO.OfficeColor? = null optional**

**insetY OfficeIMO.OfficeLength = default optional**

**offsetX OfficeIMO.OfficeLength = default optional**

**cornerRadius OfficeIMO.OfficeLength = default optional**

**stroke OfficeIMO.OfficeColor? = null optional**

**strokeWidth OfficeIMO.OfficeLength = default optional**

**fillOpacity double? = null optional**

**strokeOpacity double? = null optional**

**fillGradient OfficeIMO.Drawing.OfficeLinearGradient? = null optional**

Returns

`PdfPageBackgroundShape`

`public static PdfPageBackgroundShape Rectangle(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, OfficeColor? fill = null, OfficeColor? stroke = null, OfficeLength strokeWidth = default, double? fillOpacity = null, double? strokeOpacity = null, OfficeLinearGradient? fillGradient = null)` [#](#member-ec8813e954d4308c026ed93f)

[PdfPageBackgroundShape.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L58)

Creates a rectangle background shape.

Parameters

**x OfficeIMO.OfficeLength required**

**y OfficeIMO.OfficeLength required**

**width OfficeIMO.OfficeLength required**

**height OfficeIMO.OfficeLength required**

**fill OfficeIMO.OfficeColor? = null optional**

**stroke OfficeIMO.OfficeColor? = null optional**

**strokeWidth OfficeIMO.OfficeLength = default optional**

**fillOpacity double? = null optional**

**strokeOpacity double? = null optional**

**fillGradient OfficeIMO.Drawing.OfficeLinearGradient? = null optional**

Returns

`PdfPageBackgroundShape`

`public static PdfPageBackgroundShape RightBand(OfficeLength pageWidth, OfficeLength pageHeight, OfficeLength width, OfficeColor? fill = null, OfficeLength insetY = default, OfficeLength offsetX = default, OfficeLength cornerRadius = default, OfficeColor? stroke = null, OfficeLength strokeWidth = default, double? fillOpacity = null, double? strokeOpacity = null, OfficeLinearGradient? fillGradient = null)` [#](#member-1e4065a30e87de2d7234f1a7)

[PdfPageBackgroundShape.cs:122](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L122)

Creates a full-height band anchored to the right side of a page.

Parameters

**pageWidth OfficeIMO.OfficeLength required**

**pageHeight OfficeIMO.OfficeLength required**

**width OfficeIMO.OfficeLength required**

**fill OfficeIMO.OfficeColor? = null optional**

**insetY OfficeIMO.OfficeLength = default optional**

**offsetX OfficeIMO.OfficeLength = default optional**

**cornerRadius OfficeIMO.OfficeLength = default optional**

**stroke OfficeIMO.OfficeColor? = null optional**

**strokeWidth OfficeIMO.OfficeLength = default optional**

**fillOpacity double? = null optional**

**strokeOpacity double? = null optional**

**fillGradient OfficeIMO.Drawing.OfficeLinearGradient? = null optional**

Returns

`PdfPageBackgroundShape`

`public static PdfPageBackgroundShape RoundedRectangle(OfficeLength x, OfficeLength y, OfficeLength width, OfficeLength height, OfficeLength cornerRadius, OfficeColor? fill = null, OfficeColor? stroke = null, OfficeLength strokeWidth = default, double? fillOpacity = null, double? strokeOpacity = null, OfficeLinearGradient? fillGradient = null)` [#](#member-b57fd4876de043836563805f)

[PdfPageBackgroundShape.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L65)

Creates a rounded rectangle background shape.

Parameters

**x OfficeIMO.OfficeLength required**

**y OfficeIMO.OfficeLength required**

**width OfficeIMO.OfficeLength required**

**height OfficeIMO.OfficeLength required**

**cornerRadius OfficeIMO.OfficeLength required**

**fill OfficeIMO.OfficeColor? = null optional**

**stroke OfficeIMO.OfficeColor? = null optional**

**strokeWidth OfficeIMO.OfficeLength = default optional**

**fillOpacity double? = null optional**

**strokeOpacity double? = null optional**

**fillGradient OfficeIMO.Drawing.OfficeLinearGradient? = null optional**

Returns

`PdfPageBackgroundShape`

`public static PdfPageBackgroundShape TopBand(OfficeLength pageWidth, OfficeLength pageHeight, OfficeLength height, OfficeColor? fill = null, OfficeLength insetX = default, OfficeLength offsetY = default, OfficeLength cornerRadius = default, OfficeColor? stroke = null, OfficeLength strokeWidth = default, double? fillOpacity = null, double? strokeOpacity = null, OfficeLinearGradient? fillGradient = null)` [#](#member-53b542f856588a245463cbe1)

[PdfPageBackgroundShape.cs:79](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L79)

Creates a full-width band anchored to the top of a page.

Parameters

**pageWidth OfficeIMO.OfficeLength required**

**pageHeight OfficeIMO.OfficeLength required**

**height OfficeIMO.OfficeLength required**

**fill OfficeIMO.OfficeColor? = null optional**

**insetX OfficeIMO.OfficeLength = default optional**

**offsetY OfficeIMO.OfficeLength = default optional**

**cornerRadius OfficeIMO.OfficeLength = default optional**

**stroke OfficeIMO.OfficeColor? = null optional**

**strokeWidth OfficeIMO.OfficeLength = default optional**

**fillOpacity double? = null optional**

**strokeOpacity double? = null optional**

**fillGradient OfficeIMO.Drawing.OfficeLinearGradient? = null optional**

Returns

`PdfPageBackgroundShape`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public OfficeShape Shape { get; set; }` [#](#property-shape)

[PdfPageBackgroundShape.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L25)

Shape geometry and styling. Coordinates use the page bottom-left origin.

`public OfficeLength X { get; set; }` [#](#property-x)

[PdfPageBackgroundShape.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L34)

Left position in points from the page left edge. Negative values are allowed for bleed-style decoration.

`public OfficeLength Y { get; set; }` [#](#property-y)

[PdfPageBackgroundShape.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L43)

Bottom position in points from the page bottom edge. Negative values are allowed for bleed-style decoration.

`public bool FirstPageOnly { get; set; }` [#](#property-firstpageonly)

[PdfPageBackgroundShape.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPageBackgroundShape.cs#L54)

When true, the shape is drawn on the first page only, such as a title band that would otherwise sit behind body text on continuation pages.

<!-- PowerForge markdown artifact sha256:555E2418CEE30425BDA07959535A6763151CCFE83ED8E2FDBD4EA4473575224E -->
