# Add-OfficePdfCanvasText

Adds plain or rich native text to the active PDF canvas.

Cmdlet 

Aliases: PdfCanvasText

**Module**

`PSWriteOffice`

**Aliases**

`PdfCanvasText`

**Inputs**

`None`

**Source**

[AddOfficePdfCanvasTextCommand.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/AddOfficePdfCanvasTextCommand.cs#L14) 

Adds plain or rich native text to the active PDF canvas.

## Syntax

```
Add-OfficePdfCanvasText
[-Alignment <OfficeAlignment>]
[-BackgroundColor <OfficeColor>]
[-Baseline <Normal|Superscript|Subscript>]
[-Bold]
[-Color <OfficeColor>]
[-Font <String>]
[-Height <OfficeLength>]
[-Italic]
[-LineHeight <OfficeLength>]
[-Size <OfficeLength>]
[-Strikethrough]
[-Text] <String>
[-Underline <OfficeTextDecorationStyle>]
[-Width <OfficeLength>]
-X <OfficeLength>
-Y <OfficeLength>
[<CommonParameters>]
```

[#](#member-38f9ea6cba63d16f1c7609ef)

Parameter set: `Text`

```
Add-OfficePdfCanvasText
[-Alignment <OfficeAlignment>]
[-Color <OfficeColor>]
[-Content] <ScriptBlock>
[-Height <OfficeLength>]
[-LineHeight <OfficeLength>]
[-Size <OfficeLength>]
[-Width <OfficeLength>]
-X <OfficeLength>
-Y <OfficeLength>
[<CommonParameters>]
```

[#](#method-add-officepdfcanvastext-officealignment-officecolor-scriptblock-officelength-officelength-officelength-officelength-officelength-officelength)

Parameter set: `Content`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [PSWriteOffice DSL Cookbook](/docs/pswriteoffice/dsl-cookbook/) Guide
  
  Copy complete PowerShell recipes for Word, Excel, PowerPoint, PDF, Markdown, and multi-format document jobs.
- [Position Text and Graphics on PDF Pages](/docs/pswriteoffice/pdf-positioned-content/) Guide
  
  Choose between flowing PDF text, positioned stamps, arbitrary page canvases, and imported page overlays with explicit coordinates.

## Examples

### Example 1

```powershell
Add-OfficePdfCanvasText -Text 'Value' -X 'Value' -Y 'Value'
```

### Example 2

```powershell
Add-OfficePdfCanvasText -Content { } -X 'Value' -Y 'Value'
```

## Parameters

**-Alignment OfficeAlignment optional**

Alignment for this content.

Possible values: `Left`, `Center`, `Right`, `Justify`, `Start`, `End`

**-BackgroundColor OfficeColor optionalsets: Text**

BackgroundColor for this content.

**-Baseline PdfTextBaseline optionalsets: Text**

Baseline for this content.

Possible values: `Normal`, `Superscript`, `Subscript`

**-Bold SwitchParameter optionalsets: Text**

Bold for this content.

**-Color OfficeColor optional**

Color for this content.

**-Font String optionalsets: Text**

Font for this content.

**-Height OfficeLength optional**

Height for this content.

**-Italic SwitchParameter optionalsets: Text**

Italic for this content.

**-LineHeight OfficeLength optional**

LineHeight for this content.

**-Size OfficeLength optional**

Size for this content.

**-Strikethrough SwitchParameter optionalsets: Text**

Strikethrough for this content.

**-Text String requiredposition: 0sets: Text**

Text for this content.

**-Underline OfficeTextDecorationStyle optionalsets: Text**

Underline for this content.

Possible values: `Single`, `Double`, `Dotted`, `Dashed`, `Wavy`, `Words`

**-Width OfficeLength optional**

Width for this content.

**-X OfficeLength required**

X for this content.

**-Y OfficeLength required**

Y for this content.

**-Content ScriptBlock requiredposition: 0sets: Content**

Content for this content.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:91DE937AA6825B95F17B35B88D210C6B7B5A4CC62E18A2731E0DE46B89C6C3ED -->
