# Add-OfficePdfCanvas

Draws arbitrary visual canvas content on existing PDF pages.

Project

PSWriteOffice

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

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: PdfCanvasStamp

**Module**

`PSWriteOffice`

**Aliases**

`PdfCanvasStamp`

**Inputs**

`None`

**Outputs**

`System.IO.FileInfo`

**Source**

[AddOfficePdfCanvasCommand.cs:26](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/AddOfficePdfCanvasCommand.cs#L26) 

Draws arbitrary visual canvas content on existing PDF pages.

## Syntax

```
Add-OfficePdfCanvas
[-BehindContent]
[-ConfigureRendering <ScriptBlock>]
[-Content] <ScriptBlock>
[-IgnorePermissionRestrictions]
[-Opacity <Double>]
-OutputPath <String>
[-PageRange <String>]
[-PassThru]
[-Password <String>]
-Path <String>
[<CommonParameters>]
```

[#](#method-add-officepdfcanvas-switchparameter-scriptblock-scriptblock-switchparameter-double-string-string-switchparameter-string-string)

Parameter set: `All Parameter Sets`

## Description

The script receives a PdfPageCanvas and PdfStampPageContext. It can draw text, rich text, images, shapes, drawings, and tables. Interactive annotations, links, form fields, and outlines are separate PDF operations and are rejected by this visual-only surface.

## Examples

### Draw a page-aware review band.

```powershell
Add-OfficePdfCanvas -Path .\Report.pdf -OutputPath .\Stamped.pdf -PageRange '1,last' -Content {
    param($canvas, $page)
    $null = $canvas.Text("Review copy $($page.PageNumber)/$($page.PageCount)", 36, 24, $page.Width - 72, 24, 10)
}
```

The callback runs once for every selected page and may mix any supported visual canvas primitives.

## Parameters

**-BehindContent SwitchParameter optional**

Place the generated canvas behind existing page content.

**-ConfigureRendering ScriptBlock optional**

The callback receives a PdfOptions instance. Page geometry, margins, and encryption remain controlled by the stamping operation.

**-Content ScriptBlock requiredposition: 0**

Canvas callback. Declare parameters for the canvas and page context.

**-IgnorePermissionRestrictions SwitchParameter optional**

After successful password authentication, explicitly ignore owner-imposed usage restrictions. This does not discover, bypass, or crack a missing password.

**-Opacity Double optional**

Opacity applied to the complete generated canvas.

**-OutputPath String required**

Output PDF path.

**-PageRange String optional**

Target page selector such as 1-3,odd,last. Omit to stamp every page.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Password String optional**

Password used to authenticate an encrypted input PDF.

**-Path String requiredaliases: FilePath**

Input PDF path.

## 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).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:0144DCCC144B199B5C1E8D26C4E2E16AA0D76C66791BB17F6B4BE77412B1F04F -->
