# Add-OfficePdfImage

Adds an image to a PDF document. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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 **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: PdfImage

**Module**

`PSWriteOffice`

**Aliases**

`PdfImage`

**Inputs**

`OfficeIMO.Pdf.PdfDocument`

**Outputs**

`OfficeIMO.Pdf.PdfDocument`

**Source**

[AddOfficePdfImageCommand.cs:21](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/AddOfficePdfImageCommand.cs#L21) 

Adds an image to a PDF document.

## Syntax

```
Add-OfficePdfImage
[-Align <Left|Center|Right|Justify>]
[-AlternativeText <String>]
-Height <Double>
[-PassThru]
[-Path] <String>
-Width <Double>
[<CommonParameters>]
```

[#](#method-add-officepdfimage-pdfalign-string-double-switchparameter-string-double)

Parameter set: `Context`

```
Add-OfficePdfImage
[-Align <Left|Center|Right|Justify>]
[-AlternativeText <String>]
-Document <PdfDocument>
-Height <Double>
[-PassThru]
[-Path] <String>
-Width <Double>
[<CommonParameters>]
```

[#](#method-add-officepdfimage-pdfalign-string-pdfdocument-double-switchparameter-string-double)

Parameter set: `Document`

## Examples

### Add a logo or chart image to a PDF.

```powershell
$image = '.\Tests\Assets\CellImage.png'
New-OfficePdf -Path .\Examples\Documents\PdfImage.pdf {
    Add-OfficePdfHeading -Text 'Visual evidence'
    Add-OfficePdfImage -Path $image -Width 120 -Height 80 -Align Center -AlternativeText 'Sample chart image'
}
```

Embeds an image with alternative text in the generated PDF.

## Parameters

**-Align PdfAlign optional**

Image alignment.

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

**-AlternativeText String optional**

Alternative text for meaningful images.

**-Height Double required**

Rendered image height in PDF points.

**-PassThru SwitchParameter optional**

Emit the updated document.

**-Path String requiredposition: 0aliases: FilePath**

Image path.

**-Width Double required**

Rendered image width in PDF points.

**-Document PdfDocument requiredpipeline: True (ByValue)sets: Document**

PDF document to update outside the DSL context.

## 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:3C240715D704C8970A97968A900A13C9A7E28E81851B2F63E09C8013B83B839A -->
