# Add-OfficePdfParagraph

Adds a plain or rich PDF paragraph using PdfText children.

Cmdlet 

Aliases: PdfParagraph

**Module**

`PSWriteOffice`

**Aliases**

`PdfParagraph`

**Inputs**

`OfficeIMO.Pdf.PdfDocument`

**Outputs**

`OfficeIMO.Pdf.PdfDocument`

**Source**

[AddOfficePdfParagraphCommand.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/AddOfficePdfParagraphCommand.cs#L15) 

Adds a plain or rich PDF paragraph using PdfText children.

## Syntax

```
Add-OfficePdfParagraph
[-Alignment <OfficeAlignment>]
[-Color <OfficeColor>]
[-Text] <String>
[<CommonParameters>]
```

[#](#method-add-officepdfparagraph-officealignment-officecolor-string)

Parameter set: `Text`

```
Add-OfficePdfParagraph
[-Alignment <OfficeAlignment>]
[-Color <OfficeColor>]
-Document <PdfDocument>
[-PassThru]
[-Text] <String>
[<CommonParameters>]
```

[#](#method-add-officepdfparagraph-officealignment-officecolor-pdfdocument-switchparameter-string)

Parameter set: `DocumentText`

```
Add-OfficePdfParagraph
[-Alignment <OfficeAlignment>]
[-Color <OfficeColor>]
[-Content] <ScriptBlock>
-Document <PdfDocument>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officepdfparagraph-officealignment-officecolor-scriptblock-pdfdocument-switchparameter)

Parameter set: `DocumentContent`

```
Add-OfficePdfParagraph
[-Alignment <OfficeAlignment>]
[-Color <OfficeColor>]
[-Content] <ScriptBlock>
[<CommonParameters>]
```

[#](#method-add-officepdfparagraph-officealignment-officecolor-scriptblock)

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.
- [Migrate from PSWritePDF to PSWriteOffice](/docs/pswriteoffice/migrate-from-pswritepdf/) Guide
  
  Replace legacy PSWritePDF and iText-based scripts with maintained OfficeIMO PDF commands for authoring, extraction, forms, and merge.
- [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.
- [Pipeline, Object, and DSL Workflows](/docs/pswriteoffice/object-workflows/) Guide
  
  Choose the shortest PSWriteOffice surface for quick exports, incremental composition, complete document authoring, or existing-file updates.
- [PowerShell Document Recipes](/docs/workflows/powershell-recipes/) Guide
  
  Practical PSWriteOffice patterns for reports, presentations, PDF, CSV, Markdown, RTF, and document extraction. Includes examples and API links.
- [PDF Quick Start](/docs/pdf/quick-start/) Guide
  
  Create a PDF with headings, paragraphs, a table, and an image, then load it and read its text, with OfficeIMO.Pdf, PSWriteOffice, or the officeimo CLI.

## Examples

### Mix plain and emphasized text.

```powershell
New-OfficePdf ./Report.pdf { PdfParagraph { PdfText 'Status: '; PdfText 'Healthy' -Bold } }
```

## Parameters

**-Alignment OfficeAlignment optional**

Paragraph alignment.

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

**-Color OfficeColor optional**

Default paragraph color.

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

Plain paragraph text, including an empty paragraph.

**-Document PdfDocument requiredpipeline: True (ByValue)sets: DocumentText, DocumentContent**

Live PDF outside a composition block.

**-PassThru SwitchParameter optionalsets: DocumentText, DocumentContent**

Emit the updated live document.

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

Rich paragraph composed with PdfText.

## 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:7551A7972E7A562AA4D419DDF620C43C4112D47B6BC80B342788BD0A13E784EC -->
